File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,28 @@ RUN export GITHUB_SHA="${COMMIT_SHA}" && bash -c '\
1919 else echo "building in standard mode"; make clean splitd splitd.yaml.tpl EXTRA_BUILD_ARGS="${EXTRA_BUILD_ARGS}"; \
2020 fi'
2121
22+ # Build yq from source with updated dependencies to avoid vulnerabilities
23+ ARG YQ_VERSION=v4.52.4
24+ WORKDIR /tmp/yq-build
25+ RUN git clone --depth 1 --branch ${YQ_VERSION} https://github.com/mikefarah/yq.git . && \
26+ go get golang.org/x/net@v0.51.0 && \
27+ go mod tidy && \
28+ go build -o /go/bin/yq . && \
29+ cd /splitd && rm -rf /tmp/yq-build
30+
2231# ----- Runner image
2332FROM debian:bookworm-slim AS runner
2433
25- ARG YQ_VERSION=v4.52.4
26-
2734RUN DEBIAN_FRONTEND=noninteractive \
2835 apt-get update && \
2936 apt-get install --no-install-recommends -y \
30- bash ca-certificates wget socat && \
31- wget -O /usr/local/bin/yq \
32- "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \
33- chmod +x /usr/local/bin/yq && \
37+ bash ca-certificates socat && \
3438 mkdir -p /opt/splitd && \
3539 rm -rf /var/lib/apt/lists/*
3640
3741COPY --from=builder /splitd/splitd /opt/splitd
3842COPY --from=builder /splitd/splitd.yaml.tpl /opt/splitd
43+ COPY --from=builder /go/bin/yq /usr/local/bin/yq
3944COPY infra/entrypoint.sh /opt/splitd
4045RUN chmod +x /opt/splitd/entrypoint.sh
4146
You can’t perform that action at this time.
0 commit comments