8000 GitHub - ealasu/docker-rustup: Automated builded images for rust-lang with rustup, "the ultimate way to install RUST"
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ealasu/docker-rustup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rustup

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

Usage

pull the images:

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

the tags are:

note: the stable/beta/nightly branches does not have the package "musl-tools" and the target "x86_64-unknown-linux-musl" installed by default.

use the image

just setup the Dockerfile:
FROM liuchong/rustup:stable
...
or you maybe prefer to make a musl static building:
# you can also use "latest", which is the same as "musl".
docker run -v $PWD:/build_dir -w /build_dir -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:/build_dir -w /build_dir -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):

FROM scratch
ADD target/x86_64-unknown-linux-musl/release/your-app /
CMD ["/your-app"]
# or something like this:
# CMD ["/your-app", "--production"]

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0