mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
1b17de134b
Bumps golang from 1.21.6 to 1.22.0. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
29 lines
709 B
Docker
29 lines
709 B
Docker
FROM golang:1.22.0 as builder
|
|
|
|
WORKDIR /go/src/mikefarah/yq
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 go build -ldflags "-s -w" .
|
|
# RUN ./scripts/test.sh -- this too often times out in the github pipeline.
|
|
RUN ./scripts/acceptance.sh
|
|
|
|
# Choose alpine as a base image to make this useful for CI, as many
|
|
# CI tools expect an interactive shell inside the container
|
|
FROM alpine:3 as production
|
|
LABEL maintainer="Mike Farah <mikefarah@users.noreply.github.com>"
|
|
|
|
COPY --from=builder /go/src/mikefarah/yq/yq /usr/bin/yq
|
|
|
|
WORKDIR /workdir
|
|
|
|
RUN set -eux; \
|
|
addgroup -g 1000 yq; \
|
|
adduser -u 1000 -G yq -s /bin/sh -h /home/yq -D yq
|
|
|
|
RUN chown -R yq:yq /workdir
|
|
|
|
USER yq
|
|
|
|
ENTRYPOINT ["/usr/bin/yq"]
|