Modify Dockerfile.release to support multi-arch builds

This commit is contained in:
Grant Limberg 2022-08-23 12:59:52 -07:00
parent 64a5e0d93f
commit a9ec057b91
No known key found for this signature in database
GPG Key ID: 8F2F97D3BE8D7735

View File

@ -1,22 +1,15 @@
# vim: ft=dockerfile
FROM debian:buster as stage
FROM debian:bullseye
ARG PACKAGE_BASEURL=https://download.zerotier.com/debian/buster/pool/main/z/zerotier-one/
ARG ARCH=amd64
ARG VERSION
RUN apt-get update -qq && apt-get install curl gpg -y
RUN mkdir -p /usr/share/zerotier && \
curl -o /usr/share/zerotier/tmp.asc "https://download.zerotier.com/contact%40zerotier.com.gpg" && \
gpg --no-default-keyring --keyring /usr/share/zerotier/zerotier.gpg --import /usr/share/zerotier/tmp.asc && \
rm -f /usr/share/zerotier/tmp.asc && \
echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bullseye bullseye main" > /etc/apt/sources.list.d/zerotier.list
RUN apt-get update -qq && apt-get install curl -y
RUN curl -sSL -o zerotier-one.deb "${PACKAGE_BASEURL}/zerotier-one_${VERSION}_${ARCH}.deb"
FROM debian:buster
RUN apt-get update -qq && apt-get install openssl libssl1.1 -y
COPY --from=stage zerotier-one.deb .
RUN dpkg -i zerotier-one.deb && rm -f zerotier-one.deb
RUN echo "${VERSION}" >/etc/zerotier-version
RUN apt-get update -qq && apt-get install zerotier-one curl iproute2 net-tools iputils-ping openssl libssl1.1 -y
RUN rm -rf /var/lib/zerotier-one
COPY entrypoint.sh.release /entrypoint.sh