Update the run targets for the Makefiles for the docker containers.
This was previously using the standard docker makefile I use as a starting point for all of my docker makefiles. Now it will properly mount the source directory.
This commit is contained in:
@@ -26,10 +26,11 @@ else
|
||||
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
||||
endif
|
||||
|
||||
# NOTE: This target will write to folders underneath the git-root
|
||||
.PHONY: run
|
||||
run:
|
||||
docker run --rm -i -t $(IMAGE_NAME)
|
||||
docker run --rm --init -v "$$(readlink -f ../../):/source" --workdir=/source $(IMAGE_NAME)
|
||||
|
||||
.PHONY: shell
|
||||
shell:
|
||||
docker run --rm -i -t --entrypoint /bin/bash $(IMAGE_NAME)
|
||||
docker run --rm -i -t --entrypoint /bin/sh $(IMAGE_NAME)
|
||||
|
||||
@@ -2,3 +2,5 @@ FROM rustlang/rust:nightly-alpine3.17
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
|
||||
ENTRYPOINT ["cargo", "build"]
|
||||
|
||||
@@ -26,10 +26,11 @@ else
|
||||
@echo "REMOTE_REPO not defined, not removing from remote repo."
|
||||
endif
|
||||
|
||||
# NOTE: This target will write to folders underneath the git-root
|
||||
.PHONY: run
|
||||
run:
|
||||
docker run --rm -i -t $(IMAGE_NAME)
|
||||
docker run --rm --init -v "$$(readlink -f ../../):/source" --workdir=/source --mount source=cargo-cache,target=/usr/local/cargo/registry $(IMAGE_NAME)
|
||||
|
||||
.PHONY: shell
|
||||
shell:
|
||||
docker run --rm -i -t --entrypoint /bin/bash $(IMAGE_NAME)
|
||||
docker run --rm -i -t --entrypoint /bin/sh $(IMAGE_NAME)
|
||||
|
||||
@@ -30,3 +30,5 @@ RUN apk add --no-cache musl-dev ncurses gnutls
|
||||
RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache
|
||||
COPY --from=build-emacs /root/dist/ /
|
||||
COPY --from=build-org-mode /root/dist/ /
|
||||
|
||||
ENTRYPOINT ["cargo", "test"]
|
||||
|
||||
@@ -28,8 +28,8 @@ endif
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
docker run --rm -i -t $(IMAGE_NAME)
|
||||
docker run --rm --init -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) --no-fail-fast --lib --test test_loader
|
||||
|
||||
.PHONY: shell
|
||||
shell:
|
||||
docker run --rm -i -t --entrypoint /bin/bash $(IMAGE_NAME)
|
||||
docker run --rm -i -t --entrypoint /bin/sh $(IMAGE_NAME)
|
||||
|
||||
Reference in New Issue
Block a user