Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix image builds" #24

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
FROM golang:1.20.5 AS builder
FROM gcr.io/distroless/static

COPY . /src
WORKDIR /src

# Build the binary
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/location-api .

# Pass in name as --build-arg
FROM gcr.io/distroless/static:nonroot
# `nonroot` coming from distroless
USER 65532:65532

COPY --from=builder /src/bin/location-api /location-api
# Copy the binary that goreleaser built
COPY location-api /location-api

# Run the web service on container startup.
ENTRYPOINT ["/location-api"]
Expand Down