Skip to content

Commit

Permalink
dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
karankohli-cf committed Sep 22, 2023
1 parent 55fd894 commit 69b1092
Show file tree
Hide file tree
Showing 3 changed files with 1,444 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use the official Go image as the base image
FROM golang:1.20 AS builder

# Set the working directory
WORKDIR /ko-app

# Copy the Go application source code
COPY . .

# Build the Go application
RUN CGO_ENABLED=0 go build -o allstar ./cmd/allstar

# Use a minimal base image to reduce the image size
FROM gcr.io/distroless/base-debian10

# Copy the binary from the builder stage to the final image
COPY --from=builder /ko-app/allstar /ko-app/allstar

# Set the entry point for the final image
ENTRYPOINT ["/ko-app/allstar"]
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/gobwas/glob v0.2.3
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v50 v50.2.0
github.com/google/ko v0.14.1 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/matryer/is v1.4.0 // indirect
github.com/ossf/scorecard/v4 v4.10.5
Expand Down
Loading

0 comments on commit 69b1092

Please sign in to comment.