Skip to content

Commit

Permalink
Merge pull request #2 from gomicro/correct-docker
Browse files Browse the repository at this point in the history
build is done with releaser now
  • Loading branch information
dan9186 authored Apr 10, 2020
2 parents 7a09a03 + 7508350 commit 48cb49e
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
FROM golang:1.12-alpine
MAINTAINER [email protected]

ADD . /go/src/github.com/gomicro/doorman
ADD https://github.com/gomicro/probe/releases/download/v0.0.3/probe_0.0.3_linux_amd64.tar.gz /probe.tar.gz
RUN tar xvf /probe.tar.gz -C /

WORKDIR /go/src/github.com/gomicro/doorman

RUN CGO_ENABLED=0 \
GOOS=linux \
go build -o /service .

FROM scratch
MAINTAINER [email protected]

COPY --from=0 /service /service
COPY --from=0 /probe /probe

HEALTHCHECK --interval=5s --timeout=30s --retries=3 CMD ["/probe", "http://localhost:4567/v1/status"]
ADD doorman doorman
ADD ext/probe probe

EXPOSE 4567

CMD ["/service"]
CMD ["/doorman"]

0 comments on commit 48cb49e

Please sign in to comment.