-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Should shrink image size a lot.
- Loading branch information
Showing
1 changed file
with
12 additions
and
1 deletion.
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,3 +1,14 @@ | ||
FROM golang:onbuild | ||
FROM golang:alpine as app | ||
RUN apk --no-cache add ca-certificates git | ||
RUN mkdir -p /go/src/app | ||
WORKDIR /go/src/app | ||
COPY . /go/src/app | ||
RUN go-wrapper download && go-wrapper install | ||
|
||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
WORKDIR /root/ | ||
COPY --from=app /go/src/app/public /root/public | ||
COPY --from=app /go/bin/app . | ||
EXPOSE 1337 | ||
CMD ["./app"] |