From c17de8ef5e74cd34ad765054d723c27b9f47f1b7 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 27 Aug 2023 17:50:33 -0400 Subject: [PATCH] Set up the same mounts when running make shell. --- docker/cargo_fmt/Makefile | 2 +- docker/organic_build/Makefile | 2 +- docker/organic_test/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/cargo_fmt/Makefile b/docker/cargo_fmt/Makefile index aa6063ca..c9d958d7 100644 --- a/docker/cargo_fmt/Makefile +++ b/docker/cargo_fmt/Makefile @@ -33,4 +33,4 @@ run: .PHONY: shell shell: - docker run --rm -i -t --entrypoint /bin/sh $(IMAGE_NAME) + docker run --rm -i -t --entrypoint /bin/sh -v "$$(readlink -f ../../):/source" --workdir=/source $(IMAGE_NAME) diff --git a/docker/organic_build/Makefile b/docker/organic_build/Makefile index 29990460..709b0622 100644 --- a/docker/organic_build/Makefile +++ b/docker/organic_build/Makefile @@ -33,4 +33,4 @@ run: .PHONY: shell shell: - docker run --rm -i -t --entrypoint /bin/sh $(IMAGE_NAME) + docker run --rm -i -t --entrypoint /bin/sh -v "$$(readlink -f ../../):/source" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry $(IMAGE_NAME) diff --git a/docker/organic_test/Makefile b/docker/organic_test/Makefile index 39d566a4..28649d2a 100644 --- a/docker/organic_test/Makefile +++ b/docker/organic_test/Makefile @@ -32,4 +32,4 @@ run: .PHONY: shell shell: - docker run --rm -i -t --entrypoint /bin/sh $(IMAGE_NAME) + docker run --rm -i -t --entrypoint /bin/sh -v "$$(readlink -f ../../):/source:ro" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target $(IMAGE_NAME)