Skip to content

Rust

Dockerfile

Dockerfile
FROM rust:1.53

Makefile

Makefile
RUST_TAG := rust:1.53
WORKDIR  := /root/project
VM_RUST  := docker run --rm -v $(PWD):$(WORKDIR) -w $(WORKDIR) $(RUST_TAG)

exec:
	$(VM_RUST) $(CMD) # make exec CMD="ls"
image:
	docker build . -t $(RUST_TAG)
help:
	$(VM_RUST) cargo help
init:
	$(VM_RUST) cargo init
run:
	$(VM_RUST) cargo run
build:
	$(VM_RUST) cargo build --release

Released under the MIT License.