Skip to content

Commit 7550a14

Browse files
Fix Dockerfile build and zlib vulnerability
- Add missing build step to compile Go binary in build stage - Use CGO_ENABLED=0 for static binary compatible with Alpine - Upgrade base image from alpine:3 to alpine:3.23 to fix zlib out-of-bounds write vulnerability Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 95dd7ba commit 7550a14

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ RUN yum install -y \
77
bash \
88
go
99

10-
FROM alpine:3
10+
WORKDIR /build
11+
COPY . .
12+
RUN CGO_ENABLED=0 go build -o /bin/aws-sigv4-proxy .
13+
14+
FROM alpine:3.23
15+
1116
COPY --from=build /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/
12-
COPY --chmod=755 bin/aws-sigv4-proxy /aws-sigv4-proxy
17+
COPY --from=build /bin/aws-sigv4-proxy /aws-sigv4-proxy
1318
COPY entrypoint.sh /entrypoint.sh
1419

1520
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)