-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78aad09
commit 8448b04
Showing
3 changed files
with
50 additions
and
32 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,11 +1,21 @@ | ||
FROM golang:latest | ||
FROM golang:alpine as builder | ||
|
||
WORKDIR /server | ||
RUN apk add make | ||
|
||
COPY . . | ||
WORKDIR /build | ||
|
||
EXPOSE 8000 | ||
COPY . /build | ||
|
||
RUN go mod tidy | ||
|
||
RUN make build | ||
|
||
CMD ["./build/server"] | ||
FROM golang:alpine as runtime | ||
|
||
WORKDIR /server | ||
|
||
COPY --from=builder ./build/server /server/server | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["./build/server"] |
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