-
-
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
Showing
2 changed files
with
25 additions
and
25 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,10 +1,10 @@ | ||
# Build Stage: Build bot using the alpine image | ||
# Build Stage: Build bot using the golang image | ||
FROM golang:1.20-alpine AS builder | ||
WORKDIR /app | ||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=`go env GOHOSTOS` GOARCH=`go env GOHOSTARCH` go build -o out/aliveimage | ||
|
||
# Run Stage: Run bot using the bot and doppler binary copied from build stage | ||
FROM alpine:3.17 | ||
COPY --from=builder /app/out/aliveimage / | ||
CMD ["/aliveimage"] | ||
# Final Stage: Use a smaller base image and only include necessary files | ||
FROM scratch | ||
COPY --from=builder /app/out/aliveimage /app/aliveimage | ||
CMD ["/app/aliveimage"] |
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