mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 20:41:04 -04:00
Add .docker/Makefile for interactive testing
This commit is contained in:
parent
99f511564d
commit
89505ef084
15
.docker/Makefile
Normal file
15
.docker/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
IMAGE="dwarfs-buildenv"
|
||||
|
||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
build:
|
||||
docker build -t $(IMAGE) .
|
||||
|
||||
run:
|
||||
@docker run -it --rm \
|
||||
--cap-add SYS_ADMIN --device /dev/fuse --privileged \
|
||||
--mount type=bind,source="$(ROOT_DIR)"/..,target=/workspace,readonly \
|
||||
--mount type=bind,source="$(ROOT_DIR)"/../@docker-ccache,target=/ccache \
|
||||
--mount type=bind,source="$(ROOT_DIR)"/../@docker-build,target=/home/mhx/build \
|
||||
--env CCACHE_DIR=/ccache --env CTEST_PARALLEL_LEVEL=$(nproc) \
|
||||
--entrypoint /bin/bash $(IMAGE)
|
Loading…
x
Reference in New Issue
Block a user