-
Notifications
You must be signed in to change notification settings - Fork 0
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
87a9689
commit ed4caa5
Showing
5 changed files
with
65 additions
and
178 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
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 was deleted.
Oops, something went wrong.
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,6 +1,18 @@ | ||
FROM golang:latest | ||
COPY . /app | ||
WORKDIR /app | ||
FROM golang:1.21.0-alpine AS build | ||
|
||
COPY . /github.com/go-park-mail-ru/2023_2_Hamster/ | ||
WORKDIR /github.com/go-park-mail-ru/2023_2_Hamster/ | ||
|
||
RUN go mod download | ||
RUN go build -o app ./cmd/api/main.go | ||
ENTRYPOINT ["./app"] | ||
RUN go clean --modcache | ||
RUN go build -mod=readonly -o ./.server ./cmd/api/main.go | ||
|
||
FROM scratch AS run | ||
|
||
WORKDIR /docker-HammyWallet/ | ||
|
||
COPY --from=builder /github.com/go-park-mail-ru/2023_2_Hamster/.server . | ||
|
||
EXPOSE 80 433 | ||
|
||
ENTRYPOINT ["./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