Skip to content

Commit

Permalink
hadolint Dockerfile Use COPY not ADD Pin versions for apk packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kempsterc authored and olegbespalov committed Feb 8, 2023
1 parent 85571ca commit 9c65657
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.19-alpine as builder
WORKDIR $GOPATH/src/go.k6.io/k6
ADD . .
RUN apk --no-cache add git
COPY . .
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.16
RUN apk add --no-cache ca-certificates && \
RUN apk add --no-cache ca-certificates=~20220614 && \
adduser -D -u 12345 -g 12345 k6
COPY --from=builder /go/bin/k6 /usr/bin/k6

Expand Down

0 comments on commit 9c65657

Please sign in to comment.