-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
32 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
FROM golang:1.12 as build | ||
FROM golang:1.13 as build | ||
|
||
ENV GOOS linux | ||
ENV GOARCH amd64 | ||
ENV CGO_ENABLED 0 | ||
ENV GO111MODULE on | ||
|
||
COPY . /go/src/github.com/lamoda/gonkey | ||
WORKDIR /go/src/github.com/lamoda/gonkey | ||
WORKDIR /build | ||
|
||
# We want to populate the module cache based on the go.{mod,sum} files. | ||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
# This is the ‘magic’ step that will download all the dependencies that are specified in | ||
# the go.mod and go.sum file. | ||
# Because of how the layer caching system works in Docker, the go mod download | ||
# command will _only_ be re-run when the go.mod or go.sum file change | ||
RUN go mod download | ||
|
||
COPY . . | ||
RUN make build | ||
|
||
FROM alpine:3.9 | ||
FROM alpine:3.10 | ||
LABEL Author="Denis Sheshnev <denis.sheshnev@lamoda.ru>" | ||
|
||
COPY --from=build /go/src/github.com/lamoda/gonkey/gonkey /bin/gonkey | ||
COPY --from=build /build/gonkey /bin/gonkey | ||
ENTRYPOINT ["/bin/gonkey"] | ||
CMD ["-spec=/gonkey/swagger.yaml", "-host=${HOST_ARG}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters