Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rust in docker
version: "3.2"
services:
rust:
image: rust:1.29.2 # alternatively choose one from https://hub.docker.com/u/japaric/
volumes:
- type: bind
source: './'
target: /app/code
read_only: true
- type: volume
source: cargo_cache
target: /usr/local/cargo # setting from rust image
- type: volume
source: target_cache
target: /app/target
environment:
CARGO_TARGET_DIR: /app/target
working_dir: /app/code
volumes:
cargo_cache:
target_cache:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment