Skip to content

Commit 0572d2f

Browse files
committed
Add arm64 support for Dockerfile
1 parent 2b4c450 commit 0572d2f

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

self-hosted/Dockerfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,33 @@ LABEL org.opencontainers.image.authors="[email protected]"
1212
RUN groupadd -r sentry && useradd -r -m -g sentry sentry
1313

1414
ARG GOSU_VERSION=1.17
15-
ARG GOSU_SHA256=bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3
15+
ARG GOSU_SHA256_AMD64=bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3
16+
ARG GOSU_SHA256_ARM64=c3805a85d17f4454c23d7059bcb97e1ec1af272b90126e79ed002342de08389b
1617
ARG TINI_VERSION=0.19.0
17-
ARG TINI_SHA256=93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c
18+
ARG TINI_SHA256_AMD64=93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c
19+
ARG TINI_SHA256_ARM64=07952557df20bfd2a95f9bef198b445e006171969499a1d361bd9e6f8e5e0e81
1820

21+
ARG TARGETARCH
22+
SHELL ["/bin/bash", "-c"]
1923
RUN set -x \
2024
&& buildDeps=" \
2125
wget \
2226
" \
2327
&& apt-get update && apt-get install -y --no-install-recommends $buildDeps \
2428
&& rm -rf /var/lib/apt/lists/* \
2529
# grab gosu for easy step-down from root
26-
&& wget --quiet -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
27-
&& echo "$GOSU_SHA256 /usr/local/bin/gosu" | sha256sum --check --status \
30+
&& wget --quiet -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-${TARGETARCH}" \
31+
&& gosu_hash_var_name="GOSU_SHA256_$(echo $TARGETARCH | tr '[:lower:]' '[:upper:]')" \
32+
&& echo "${!gosu_hash_var_name} /usr/local/bin/gosu" | sha256sum --check --status \
2833
&& chmod +x /usr/local/bin/gosu \
2934
# grab tini for signal processing and zombie killing
30-
&& wget --quiet -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-amd64" \
31-
&& echo "$TINI_SHA256 /usr/local/bin/tini" | sha256sum --check --status \
35+
&& wget --quiet -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-${TARGETARCH}" \
36+
&& tini_hash_var_name="TINI_SHA256_$(echo $TARGETARCH | tr '[:lower:]' '[:upper:]')" \
37+
&& echo "${!tini_hash_var_name} /usr/local/bin/tini" | sha256sum --check --status \
3238
&& chmod +x /usr/local/bin/tini \
3339
&& apt-get purge -y --auto-remove $buildDeps
3440

41+
SHELL ["/bin/sh", "-c"]
3542
WORKDIR /usr/src/sentry
3643

3744
ENV PATH=/.venv/bin:$PATH PIP_NO_CACHE_DIR=1 PIP_DISABLE_PIP_VERSION_CHECK=1

0 commit comments

Comments
 (0)