File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 1- # Stage 1: Dependencies
2- FROM golang:1.24.4-alpine3.21 AS deps
1+ # build 1
2+ FROM golang:1.24.4-alpine3.21 AS build
33
44WORKDIR /app
55
66COPY go.mod go.sum ./
7- RUN go mod tidy
7+ RUN go mod download
88
9- # Stage 2: Build
10- FROM deps AS build-stage
119COPY . .
1210
13- RUN go build -ldflags "-X main.version=v1.3.3 " -o poke-cli .
11+ RUN go build -ldflags "-X main.version=v1.3.2 " -o poke-cli .
1412
15- # Stage 3: Production
13+ # build 2
1614FROM --platform=$BUILDPLATFORM alpine:latest
1715
1816# Install only necessary packages and remove them after use
@@ -21,7 +19,7 @@ RUN apk add --no-cache shadow && \
2119 sed -i 's/^root:.*/root:!*:0:0:root:\/ root:\/ sbin\/ nologin/' /etc/passwd && \
2220 apk del shadow
2321
24- COPY --from=build-stage /app/poke-cli /app/poke-cli
22+ COPY --from=build /app/poke-cli /app/poke-cli
2523
2624ENV TERM=xterm-256color
2725ENV COLOR_OUTPUT=true
You can’t perform that action at this time.
0 commit comments