Public | Automated Build

Last pushed: 11 days ago
Short Description
Docker image for the Rust programming language and a few supporting tools.
Full Description

docker-rust

Fork from Docker Hub.

This repository is used to build a Docker image for the Rust programming
language and a few supporting tools. The image includes the following tools :

  • rustc,
  • rustdoc,
  • cargo,
  • `cargo-check,
  • rusfmt
  • git,
  • SSL certificates,
  • build essentials,

So it should be able to run cargo build on most projects out of the box.
The path /source is a volume where you can mount a Cargo project from the
host machine.

Usage

work inside the docker

The following command will drop you into a Bash shell with the current
directory on the host shared. From there you can run rustc, rustdoc,
and cargo as you please.

docker run -it --rm -v $(pwd):/source grummfy/docker-rust

work

cargo command

docker run --rm -v $PWD:/source grummfy/docker-rust cargo run

rustc

docker run --rm -v $PWD:/source grummfy/docker-rust rustc src/main.rs

format (coding style) your code

docker run --rm -v $PWD:/source grummfy/docker-rust rustfmt src/main.rs

Build it

docker build --build-arg RUST_VERSION=beta -t grummfy/docker-rust:beta-latest .
docker build --build-arg RUST_VERSION=stable -t grummfy/docker-rust:stable-latest .
docker build --build-arg RUST_VERSION=1.10.0 -t grummfy/docker-rust:1.10.0 .

License

MIT

Docker Pull Command
Owner
grummfy
Source Repository

Comments (0)