Public Repository

Last pushed: 8 months ago
Short Description
Rust development environment based on Docker.
Full Description

Summary

Rust development environment based on Docker.

Features

  • 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, NOT musl: you will therefore NOT be able to compile static Rust binaries.
  • inotify-tools is pre-installed to allow continuous compilation scripts -- see below example.

Usage

$ docker pull marccarre/rust-dev-env

and then either re-use in other images or run one of the below commands:

  1. Interactive shell:

     $ docker run -ti marccarre/rust-dev-env /bin/bash
    
  2. Interactive shell with current directory mounted:

     $ docker run -ti -v $(pwd):/home/rust marccarre/rust-dev-env /bin/bash
    
  3. 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
    
  4. 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
    

Sample project

See: https://github.com/marccarre/rust-sample-project

Quay.io

https://quay.io/repository/marccarre/rust-dev-env

GitHub

https://github.com/marccarre/rust-docker-dev-env

Docker Pull Command
Owner
marccarre