Skip to content

Commit

Permalink
docker: Do not pin the ca-certs pkg version
Browse files Browse the repository at this point in the history
Hadolint advises to pin a version, but in this specific case isn't
very useful because:
- We always want the latest version for the ca-certificates package
- It has a date-based versioning so we couldn't use the common `=~`
  selector for patch updates. It mostly breaks every time the Alpine
  repository releases a new version because they don't keep the previous one.
  • Loading branch information
codebien committed May 8, 2023
1 parent b52d12c commit 875b098
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ RUN apk --no-cache add git=~2
RUN CGO_ENABLED=0 go install -a -trimpath -ldflags "-s -w -X go.k6.io/k6/lib/consts.VersionDetails=$(date -u +"%FT%T%z")/$(git describe --tags --always --long --dirty)"

FROM alpine:3.17
RUN apk add --no-cache ca-certificates=~20220614 && \
# hadolint ignore=DL3018
RUN apk add --no-cache ca-certificates && \
adduser -D -u 12345 -g 12345 k6
COPY --from=builder /go/bin/k6 /usr/bin/k6

Expand Down

0 comments on commit 875b098

Please sign in to comment.