-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
23 lines (19 loc) · 972 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/library/busybox:1.35.0 as builder
RUN mkdir /.cache && touch -t 202101010000.00 /.cache
ARG TARGETOS=linux
ARG TARGETARCH=amd64
ARG TARGETVARIANT
WORKDIR /app
COPY goreleaser/dist dist
# NOTICE: See goreleaser.yml for the build paths.
RUN if [ "${TARGETARCH}" == 'amd64' ]; then \
cp "dist/parca-debuginfo_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT:-v1}/parca-debuginfo" . ; \
elif [ "${TARGETARCH}" == 'arm' ]; then \
cp "dist/parca-debuginfo_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT##v}/parca-debuginfo" . ; \
else \
cp "dist/parca-debuginfo_${TARGETOS}_${TARGETARCH}/parca-debuginfo" . ; \
fi
RUN chmod +x parca-debuginfo
FROM --platform="${TARGETPLATFORM:-linux/amd64}" gcr.io/distroless/static@sha256:21d3f84a4f37c36199fd07ad5544dcafecc17776e3f3628baf9a57c8c0181b3f
COPY --chown=0:0 --from=builder /app/parca-debuginfo /bin/parca-debuginfo
CMD ["/bin/parca-debuginfo"]