Skip to content

Commit 0f50d2f

Browse files
Migrated full container to debian-slim
1 parent 2ed7f27 commit 0f50d2f

File tree

1 file changed

+16
-28
lines changed

1 file changed

+16
-28
lines changed

full/Dockerfile

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,37 @@
11
FROM ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
22

3-
ARG RUST_STABLE_VERSION=1.83.0
4-
ARG RUST_NIGHTLY_VERSION=nightly-2024-12-01
5-
6-
ENV RUST_STABLE=$RUST_STABLE_VERSION
7-
ENV RUST_NIGHTLY=$RUST_NIGHTLY_VERSION
3+
ENV RUST_STABLE=1.83.0
4+
ENV RUST_NIGHTLY=nightly-2024-12-01
85

96
# Add curl for Rust buildchain
10-
RUN apk add --update-cache --upgrade curl
7+
RUN apt install -y --no-install-recommends curl
118

129
# Define rustup/cargo home directories
13-
ENV RUSTUP_HOME=/opt/rustup \
14-
CARGO_HOME=/opt/.cargo
15-
16-
RUN apk add rustup
10+
ENV RUSTUP_HOME=/opt/rustup
11+
ENV CARGO_HOME=/opt/.cargo
1712

1813
# Adding cargo binaries to PATH
19-
ENV PATH=${CARGO_HOME}/bin:${PATH}
14+
ENV PATH=${PATH}:${CARGO_HOME}/bin
2015

21-
# Installing rustup and setting the default toolchain to the RUST_STABLE_VERSION channel.
22-
RUN rustup-init --default-toolchain $RUST_STABLE_VERSION -y
16+
# Installing rustup and setting the default toolchain to the RUST_STABLE channel.
17+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUST_STABLE -y
2318

24-
# Installing nightly channel version RUST_NIGHTLY_VERSION (for Rust applications).
25-
RUN rustup install $RUST_NIGHTLY_VERSION
19+
# Installing nightly channel version RUST_NIGHTLY (for Rust applications).
20+
RUN rustup install $RUST_NIGHTLY
2621

2722
# Adding ARMV6M target to the installed stable and nightly toolchains
28-
RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_STABLE_VERSION
29-
RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY_VERSION
23+
RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_STABLE
24+
RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY
3025

3126
# Adding rust-src component to nightly and stable channels
32-
RUN rustup component add rust-src --toolchain $RUST_NIGHTLY_VERSION
33-
RUN rustup component add rust-src --toolchain $RUST_STABLE_VERSION
34-
35-
# Python packages building dependencies, can be removed afterwards
36-
RUN apk add -t python_build_deps python3-dev \
37-
libffi-dev
27+
RUN rustup component add rust-src --toolchain $RUST_NIGHTLY
28+
RUN rustup component add rust-src --toolchain $RUST_STABLE
3829

3930
# Install ledgerctl, which is used by cargo ledger for loading or dumping an APDU app file.
40-
RUN pip3 install --no-cache-dir ledgerwallet==0.5.2
41-
42-
# Cleanup, remove packages that aren't needed anymore
43-
RUN apk del python_build_deps
31+
RUN pip3 install --break-system-packages --no-cache-dir ledgerwallet==0.5.2
4432

4533
# Add cargo ledger
46-
RUN cargo +$RUST_STABLE_VERSION install --version 1.7.0 cargo-ledger
34+
RUN cargo +$RUST_STABLE install --version 1.7.0 cargo-ledger
4735

4836
# Setup cargo ledger (install JSON target files and custom link script) for nightly
4937
RUN cargo ledger setup

0 commit comments

Comments
 (0)