Skip to content

andrewsardone/rust-docker-dev-env

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Docker Pulls on Quay Docker Pulls on DockerHub

rust-docker-dev-env

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

or

$ docker pull quay.io/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

Build & Release

Pre-requisites

  • Docker
  • make
  • Internet connection

Build

$ make

Release

$ docker login
$ docker login quay.io
$ make release

About

Rust development environment based on Docker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 72.9%
  • Shell 27.1%