diff --git a/Dockerfile b/Dockerfile index 558cf6f..29f46d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,41 +7,41 @@ ARG APTLY_VERSION=1.6.3 ARG APTLY_ZIP_SHA256=535ed24eb706bc25a316b59d709a7e74e10165f2ffab8552097ba7e4816a3e7e RUN dnf -y install --allowerasing \ - bash binutils ca-certificates cmake coreutils createrepo_c curl findutils \ - gcc gcc-c++ git gnupg2 gzip make openssl pkgconf-pkg-config python3 python3.11 \ - rpm rsync shadow-utils sqlite-devel tar unzip xz \ - && dnf clean all \ - && rm -rf /var/cache/dnf + bash binutils ca-certificates cmake coreutils createrepo_c curl findutils \ + gcc gcc-c++ git gnupg2 gzip make openssl pkgconf-pkg-config python3 python3.11 \ + rpm rsync shadow-utils sqlite-devel tar unzip xz bzip2 \ + && dnf clean all \ + && rm -rf /var/cache/dnf RUN set -eux; \ - curl -fsSL -o /tmp/nfpm.rpm \ - "https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm-${NFPM_VERSION}-1.x86_64.rpm"; \ - echo "${NFPM_RPM_SHA256} /tmp/nfpm.rpm" | sha256sum -c -; \ - rpm -Uvh /tmp/nfpm.rpm; \ - rm -f /tmp/nfpm.rpm; \ - nfpm --version + curl -fsSL -o /tmp/nfpm.rpm \ + "https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm-${NFPM_VERSION}-1.x86_64.rpm"; \ + echo "${NFPM_RPM_SHA256} /tmp/nfpm.rpm" | sha256sum -c -; \ + rpm -Uvh /tmp/nfpm.rpm; \ + rm -f /tmp/nfpm.rpm; \ + nfpm --version RUN set -eux; \ - curl -fsSL -o /tmp/aptly.zip \ - "https://github.com/aptly-dev/aptly/releases/download/v${APTLY_VERSION}/aptly_${APTLY_VERSION}_linux_amd64.zip"; \ - echo "${APTLY_ZIP_SHA256} /tmp/aptly.zip" | sha256sum -c -; \ - mkdir -p /tmp/aptly; \ - unzip -q /tmp/aptly.zip -d /tmp/aptly; \ - install -m 0755 "$(find /tmp/aptly -type f -name aptly | head -n1)" /usr/local/bin/aptly; \ - rm -rf /tmp/aptly /tmp/aptly.zip; \ - aptly version + curl -fsSL -o /tmp/aptly.zip \ + "https://github.com/aptly-dev/aptly/releases/download/v${APTLY_VERSION}/aptly_${APTLY_VERSION}_linux_amd64.zip"; \ + echo "${APTLY_ZIP_SHA256} /tmp/aptly.zip" | sha256sum -c -; \ + mkdir -p /tmp/aptly; \ + unzip -q /tmp/aptly.zip -d /tmp/aptly; \ + install -m 0755 "$(find /tmp/aptly -type f -name aptly | head -n1)" /usr/local/bin/aptly; \ + rm -rf /tmp/aptly /tmp/aptly.zip; \ + aptly version ENV RUSTUP_HOME=/opt/rustup \ - CARGO_HOME=/opt/cargo \ - RUST_PROXY_PYTHON=/usr/bin/python3.11 \ - PATH=/opt/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + CARGO_HOME=/opt/cargo \ + RUST_PROXY_PYTHON=/usr/bin/python3.11 \ + PATH=/opt/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN set -eux; \ - curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs -o /tmp/rustup-init.sh; \ - sh /tmp/rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain "${RUST_TOOLCHAIN}" --component rustfmt --component clippy; \ - rm -f /tmp/rustup-init.sh; \ - rustc --version; \ - cargo --version + curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs -o /tmp/rustup-init.sh; \ + sh /tmp/rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain "${RUST_TOOLCHAIN}" --component rustfmt --component clippy; \ + rm -f /tmp/rustup-init.sh; \ + rustc --version; \ + cargo --version # Registry/git/target cache is persistent, while rustup/toolchains stay in the image. ENV CARGO_HOME=/var/lib/package-builder/cargo