diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..186cd6e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,20 @@ +# Build output and VCS data are not needed in the image and are huge +/target/ +/.git/ +node_modules/ + +# Local configuration with passwords and runtime data must never get into an image layer +/config.toml +/data/ +/assets/data/ +/Maildir/ + +# Local tooling and scratch files +/.idea/ +/.vscode/ +/.settings/ +/.project +/.claude/ +/html/ +/local_history.patch +/end2end/ diff --git a/Dockerfile b/Dockerfile index 2b6cf95..30061fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,10 @@ FROM rust:1.86.0-bookworm AS builder # Install cargo-binstall, which makes it easier to install other # cargo extensions like cargo-leptos -RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz -RUN cp cargo-binstall /usr/local/cargo/bin +# (uname -m gives x86_64 or aarch64, so the image builds on both architectures) +RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-$(uname -m)-unknown-linux-musl.tgz \ + && tar -xvf cargo-binstall-$(uname -m)-unknown-linux-musl.tgz \ + && cp cargo-binstall /usr/local/cargo/bin # Install required tools RUN apt-get update -y \