liuchong
docker-rustup
Dockerfile

Automated builded images for rust-lang with rustup, "the ultimate way to install RUST"

Last updated Jun 15, 2026
90
Stars
14
Forks
1
Issues
0
Stars/day
Attention Score
24
Language breakdown
Dockerfile 82.6%
Shell 17.4%
โ–ธ Files click to expand
README

rustup

Build Status FOSSA Status

Automated builded images on store and hub for rust-lang with musl added, using rustup "the ultimate way to install RUST".

tag changed: all3 -> all

note:

  • Image buildings are triggered by automated builds on cloud.docker.com when "build branch" is updated by build.sh
  • Please check liuchong/rustup tags on store instead of Build Details on hub
  • The "build branch" and "tags" are meaningless but just docker images(which are with stable/versions tags) for building
  • the "version tags" are available from 1.15.0
  • the stable/beta/nightly tags does not have the package "musl-tools" and the target "x86_64-unknown-linux-musl" installed by default

Usage

Images

pull the images:

shell
> docker pull liuchong/rustup
> docker pull liuchong/rustup:musl

the tags are:

use the image

just setup the Dockerfile:
dockerfile
FROM liuchong/rustup:stable
...
or you maybe prefer to make a musl static building:
bash

you can also use "latest", which is the same as "musl".

docker run -v $PWD:/builddir -w /builddir -t liuchong/rustup:musl cargo build --release

or, you may want to use nightly channel and fix the ownership and remove container after run as below:

docker run --rm -v $PWD:/builddir -w /builddir -t liuchong/rustup:musl sh -c "rustup run nightly cargo build --release && chown -R $(id -u):$(id -g) target"

then, you can write a dockerfile like this and build you app image(so, the image will be very small):

dockerfile
FROM scratch
ADD target/x86_64-unknown-linux-musl/release/your-app /
CMD ["/your-app"]

or something like this:

CMD ["/your-app", "--production"]

Build script

bash

Use automatical checked version from website for current stable builds:

./build.sh

Use a specified stable version from command line:

./build.sh 1.21.0

Do not build versioning tag, just pass a string which is not fit the version pattern,

as the first argument:

./build.sh no-version ./build.sh foo

License

MIT

FOSSA Status

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท liuchong/docker-rustup ยท Updated daily from GitHub