Skip to content

Commit

Permalink
Fix FromAsCasing in docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeire committed Aug 23, 2024
1 parent e47a724 commit d6f01f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stage to copy the code and fetch dependencies
# try to keep the debian version in sync with the distroless version
FROM golang:1.23-bookworm as base
FROM golang:1.23-bookworm AS base

ARG VERSION=development

Expand All @@ -14,18 +14,18 @@ COPY main.go ./
COPY pkg/ ./pkg

# Stage to test the code
FROM base as test
FROM base AS test

RUN go vet -v
RUN go test -v

# Stage to build the binary
FROM base as build
FROM base AS build

RUN CGO_ENABLED=0 go build -ldflags="-X 'github.com/blackskad/go-web-scaffold/environment.Version=${VERSION}'" -o app .

# Stage with the production binary
FROM gcr.io/distroless/static-debian12 as production
FROM gcr.io/distroless/static-debian12 AS production

COPY --from=build /work/app /

Expand Down

0 comments on commit d6f01f1

Please sign in to comment.