Rust development environment based on Docker.
- Image is based on the latest slim version of Debian Jessie.
- Image is kept as small as possible.
- Rust binaries are verified using GPG.
- Rust binaries are pulled from the official repository, hence are based on
glibc
, NOTmusl
: you will therefore NOT be able to compile static Rust binaries. inotify-tools
is pre-installed to allow continuous compilation scripts -- see below example.
$ docker pull marccarre/rust-dev-env
or
$ docker pull quay.io/marccarre/rust-dev-env
and then either re-use in other images or run one of the below commands:
-
Interactive shell:
$ docker run -ti marccarre/rust-dev-env /bin/bash
-
Interactive shell with current directory mounted:
$ docker run -ti -v $(pwd):/home/rust marccarre/rust-dev-env /bin/bash
-
Continuous build with current directory mounted, and assuming directory contains
/home/rust/src/main.rs
:$ docker run -ti -v $(pwd):/home/rust marccarre/rust-dev-env build-continuously.sh Setting up watches. Beware: since -r was given, this may take a while! Watches established. [2017-03-25 20:55:58] MODIFY on main.rs. Rebuilding now... Compiling hello v1.0.0 (file:///home/rust) Finished dev [unoptimized + debuginfo] target(s) in 1.59 secs
-
Continuous build with current directory mounted, and assuming
/path/to/src/main.rs
:$ docker run -ti -v $(pwd):/home/rust marccarre/rust-dev-env build-continuously.sh /path/to Setting up watches. Beware: since -r was given, this may take a while! Watches established. [2017-03-25 20:56:25] MODIFY on main.rs. Rebuilding now... Compiling hello v1.0.0 (file:///home/rust) Finished dev [unoptimized + debuginfo] target(s) in 1.97 secs
See: https://github.com/marccarre/rust-sample-project
- Docker
make
- Internet connection
$ make
$ docker login
$ docker login quay.io
$ make release