Skip to content

Commit 0dcc198

Browse files
reverting back
1 parent 0282eee commit 0dcc198

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
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

44
WORKDIR /app
55

66
COPY 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
119
COPY . .
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
1614
FROM --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

2624
ENV TERM=xterm-256color
2725
ENV COLOR_OUTPUT=true

0 commit comments

Comments
 (0)