Skip to content

Commit

Permalink
Handle go modules properly in Dockerfile with Go 1.13 (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
joohoi committed Jan 10, 2020
1 parent 3d5a512 commit 5de2191
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ LABEL maintainer="[email protected]"

RUN apk add --update gcc musl-dev git

RUN go get github.com/joohoi/acme-dns
WORKDIR /go/src/github.com/joohoi/acme-dns
ENV GOPATH /tmp/buildcache
RUN git clone https://github.com/joohoi/acme-dns /tmp/acme-dns
WORKDIR /tmp/acme-dns
RUN CGO_ENABLED=1 go build

FROM alpine:latest

WORKDIR /root/
COPY --from=builder /go/src/github.com/joohoi/acme-dns .
COPY --from=builder /tmp/acme-dns .
RUN mkdir -p /etc/acme-dns
RUN mkdir -p /var/lib/acme-dns
RUN rm -rf ./config.cfg
Expand Down

0 comments on commit 5de2191

Please sign in to comment.