Skip to content

Instantly share code, notes, and snippets.

@Sir-Photch
Created May 11, 2023 12:29
Show Gist options
  • Save Sir-Photch/02f5dc2571a70c2f5354c301256ca6c6 to your computer and use it in GitHub Desktop.
Save Sir-Photch/02f5dc2571a70c2f5354c301256ca6c6 to your computer and use it in GitHub Desktop.
AArch64 Raspberry Pi OS Dockerfile
ARG DEBIAN_FRONTEND=noninteractive
FROM busybox:latest
ADD https://downloads.raspberrypi.org/raspios_lite_arm64/root.tar.xz /
RUN set -xeu && \
mkdir "/rpi-root" && \
tar xaf /root.tar.xz -C /rpi-root
FROM scratch
COPY --from=0 /rpi-root /
RUN set -xeu && \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get autoremove -y --purge && \
apt-get -y autoclean
# build-deps
RUN set -xeu && \
apt-get install -y libclang-dev libssl-dev clang git curl
# rust
RUN set -xeu && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal && \
echo "[net]\ngit-fetch-with-cli = true" > /root/.cargo/config
ENV PATH="${PATH}:/root/.cargo/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment