Skip to content

Commit 6c7433f

Browse files
committed
Updated docker file
1 parent b39a84e commit 6c7433f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

infra/sidecar.Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff 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
2332
FROM debian:bookworm-slim AS runner
2433

25-
ARG YQ_VERSION=v4.52.4
26-
2734
RUN 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

3741
COPY --from=builder /splitd/splitd /opt/splitd
3842
COPY --from=builder /splitd/splitd.yaml.tpl /opt/splitd
43+
COPY --from=builder /go/bin/yq /usr/local/bin/yq
3944
COPY infra/entrypoint.sh /opt/splitd
4045
RUN chmod +x /opt/splitd/entrypoint.sh
4146

0 commit comments

Comments
 (0)