Skip to content

Commit 3e8a3a4

Browse files
author
Per Abich
committed
Cleaning up the Dockerfile
1 parent 72c753f commit 3e8a3a4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
.idea/
3+
*.iml
4+
.git/

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
FROM golang:1.13 as builder
33

44
# Add the project in the image
5-
ADD . /go/src/github.com/kumina/postfix_exporter
6-
WORKDIR /go/src/github.com/kumina/postfix_exporter
5+
ADD . /build
6+
WORKDIR /build
77

88
# Install needed dependencies for the build
99
RUN apt-get update -q && apt-get install -qy \
@@ -21,6 +21,6 @@ EXPOSE 9154
2121
WORKDIR /
2222

2323
# Copy the binary from the build image to the real one
24-
COPY --from=builder /go/src/github.com/kumina/postfix_exporter/postfix_exporter .
24+
COPY --from=builder /build/postfix_exporter .
2525

2626
ENTRYPOINT ["/postfix_exporter"]

0 commit comments

Comments
 (0)