docker-library / python

Docker Official Image packaging for Python
https://www.python.org/
MIT License
2.55k stars 1.07k forks source link

i386/python doesn't contain Rust #986

Open BinarSkugga opened 4 hours ago

BinarSkugga commented 4 hours ago

As opposed to the traditional Docker image for Python, the i386 version doesn't seem to have rust installed. Rust can be built using i686, I have managed to make it working by lifting the Rust docker image script:

# Build Rust
ENV RUSTUP_HOME=/usr/local/rustup \
    CARGO_HOME=/usr/local/cargo \
    PATH=/usr/local/cargo/bin:$PATH \
    RUST_VERSION=1.82.0

RUN set -eux; \
    rustArch='i686-unknown-linux-gnu'; rustupSha256='0a6bed6e9f21192a51f83977716466895706059afb880500ff1d0e751ada5237'; \
    url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init"; \
    wget "$url"; \
    echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
    chmod +x rustup-init; \
    ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \
    rm rustup-init; \
    chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
    rustup --version; \
    cargo --version; \
    rustc --version;
tianon commented 3 hours ago

I'm confused -- none of the Python images (should) have Rust installed in them? :thinking:

Edit: to illustrate:

$ docker run -it --rm --pull=always python bash
latest: Pulling from library/python
Digest: sha256:a31cbb4db18c6f09e3300fa85b77f6d56702501fcb9bdb8792ec702a39ba6200
Status: Image is up to date for python:latest
root@a61e84519208:/# rustc
bash: rustc: command not found