Docker build

This commit is contained in:
Michael Zhang 2023-02-01 02:37:02 -06:00
parent 1d42ae9850
commit 3ffd9ef2e5
3 changed files with 25 additions and 0 deletions

View file

@ -1,2 +1,3 @@
/target
*.ppm
*.zip

23
assignment-1/Makefile Normal file
View file

@ -0,0 +1,23 @@
.PHONY: clean
HANDIN := hw1a.michael.zhang.zip
BINARY := target/release/assignment-1
all: $(HANDIN)
$(BINARY):
docker run \
--rm \
-v "$(shell pwd)":/usr/src/myapp \
-v cargo-registry:/usr/local/cargo \
--user "$(shell id -u)":"$(shell id -g)" \
-w /usr/src/myapp \
rust \
cargo build --release
$(HANDIN): $(BINARY) Cargo.toml Cargo.lock README.md
zip -r $@ src $<
clean:
rm -f $(HANDIN) $(BINARY)

1
assignment-1/README.md Normal file
View file

@ -0,0 +1 @@
# Raycaster