mirror of
https://github.com/mikefarah/yq.git
synced 2026-10-12 02:19:06 +00:00
Bumps golang from `512690a` to `3680233`. --- updated-dependencies: - dependency-name: golang dependency-version: 1.27.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
29 lines
853 B
Docker
29 lines
853 B
Docker
FROM golang:1.27.1@sha256:3680233e3204827fbdc66088528ae6d4b3d034f51d03a99d454f6de034888244 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@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6 AS production
|
|
LABEL maintainer="Mike Farah <[email protected]>"
|
|
|
|
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"]
|