rust-lang / rust-lang/docker-rust
Cargo stuck at "Updating crates.io"
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 537
- Forks
- 111
- Avg merge
- 1d 38m
- Merged PRs (30d)
- 4
Description
OS: Arch Linux
Kernel: 5.18.16-arch1-1
Docker version: Docker version 20.10.17, build 100c70180f
I have been trying to get docker working for an app I was working on, but when I install packages, cargo gets stuck at "Updating crates.io" I tried some solutions, but none of them proved effective. Here's my Dockerfile:
FROM alpine:3.16
WORKDIR /opt/app
COPY . .
RUN apk add --no-cache \
ca-certificates \
gcc \
curl
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.62.1
RUN set -eux; \
apkArch="$(apk --print-arch)"; \
case "$apkArch" in \
x86_64) rustArch='x86_64-unknown-linux-musl'; rustupSha256='bdf022eb7cba403d0285bb62cbc47211f610caec24589a72af70e1e900663be9' ;; \
aarch64) rustArch='aarch64-unknown-linux-musl'; rustupSha256='89ce657fe41e83186f5a6cdca4e0fd40edab4fd41b0f9161ac6241d49fbdbbbe' ;; \
*) echo >&2 "unsupported architecture: $apkArch"; exit 1 ;; \
esac; \
url="https://static.rust-lang.org/rustup/archive/1.24.3/${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;
RUN rustup target add wasm32-unknown-unknown; \
cargo install wasm-bindgen-cli;
RUN curl -LO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64; \
chmod +x tailwindcss-linux-x64; \
mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss; \
curl -L https://github.com/thedodd/trunk/releases/download/v0.16.0/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-; \
mv trunk /usr/local/bin/trunk; \
cd frontend;
cmd ["trunk", "serve"]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Dockerfile's RUN command that adds the wasm target and installs wasm-bindgen-cli, then reproduce the build while observing the cargo step stuck at "Updating crates.io." Compare the container's network and registry behavior with the documented Rust Docker setup; done means the image build completes past the cargo installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile, rust
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100