File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change 1
- # syntax=docker/dockerfile:1
2
1
FROM golang:1.22 AS build
3
2
WORKDIR /app
4
3
5
- # pull what's in go.mod (fast cacheable layer)
6
4
COPY go.mod ./
7
5
RUN go mod download
8
6
9
- # now bring in code and resolve any new imports (adds go.sum entries)
10
7
COPY . .
11
8
RUN go mod tidy
12
9
13
- # build
14
10
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/app ./cmd/server
15
11
16
12
FROM gcr.io/distroless/base-debian12
@@ -19,4 +15,4 @@ COPY --from=build /out/app /app
19
15
USER 65532:65532
20
16
ENV PORT=8080
21
17
EXPOSE 8080
22
- ENTRYPOINT ["/app" ]
18
+ ENTRYPOINT ["/app" ]
Original file line number Diff line number Diff line change 1
- # syntax=docker/dockerfile:1
2
1
FROM golang:1.22 AS build
3
2
WORKDIR /app
4
3
5
- # pull what's in go.mod (fast cacheable layer)
6
4
COPY go.mod ./
7
5
RUN go mod download
8
6
9
- # now bring in code and resolve any new imports (adds go.sum entries)
10
7
COPY . .
11
8
RUN go mod tidy
12
9
13
- # build
14
10
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/app ./cmd/server
15
11
16
12
FROM gcr.io/distroless/base-debian12
@@ -19,4 +15,4 @@ COPY --from=build /out/app /app
19
15
USER 65532:65532
20
16
ENV PORT=8080
21
17
EXPOSE 8080
22
- ENTRYPOINT ["/app" ]
18
+ ENTRYPOINT ["/app" ]
You can’t perform that action at this time.
0 commit comments