Cleaning up the Dockerfile
This commit is contained in:
parent
72c753ff7d
commit
3e8a3a4917
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
.idea/
|
||||
*.iml
|
||||
.git/
|
@ -2,8 +2,8 @@
|
||||
FROM golang:1.13 as builder
|
||||
|
||||
# Add the project in the image
|
||||
ADD . /go/src/github.com/kumina/postfix_exporter
|
||||
WORKDIR /go/src/github.com/kumina/postfix_exporter
|
||||
ADD . /build
|
||||
WORKDIR /build
|
||||
|
||||
# Install needed dependencies for the build
|
||||
RUN apt-get update -q && apt-get install -qy \
|
||||
@ -21,6 +21,6 @@ EXPOSE 9154
|
||||
WORKDIR /
|
||||
|
||||
# Copy the binary from the build image to the real one
|
||||
COPY --from=builder /go/src/github.com/kumina/postfix_exporter/postfix_exporter .
|
||||
COPY --from=builder /build/postfix_exporter .
|
||||
|
||||
ENTRYPOINT ["/postfix_exporter"]
|
||||
|
Loading…
Reference in New Issue
Block a user