Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.04 KB

README.adoc

File metadata and controls

47 lines (36 loc) · 1.04 KB

Docker: Rust

Build Status

A development environment for rust that projects can use as a base.

Usage

  1. Just make a Dockerfile in your project like this:

    FROM aetheric/rust:stable
    
    # Add needed alpine packages
    RUN apk --no-cache add --virtual .build-dependencies \
    	gcc
    
    # Install whatever binaries you need
    RUN cargo install cargo-watch
    
    # Make sure to clean up your apk additions.
    RUN apk del .build-dependencies
  2. Then call the following command to run a build:

    docker build \
    	--tag reponame/projectname \
    	.
  3. And finally, get to running docker commands:

    docker run reponame/projectname \
    	--volume .:/usr/work \
    	--interactive \
    	--tty \
    	watch

It’s a good idea to put that last one in a script so commands can be run against the project a lot easier. Alternately, you can run it with the --interactive flag to just keep running commands.