mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-13 06:16:55 -04:00
chore: support building ARM image in docker makefile
This commit is contained in:
parent
4c52178626
commit
0967b9bdf8
@ -1,10 +1,14 @@
|
|||||||
IMAGE="dwarfs-buildenv"
|
IMAGE="dwarfs-buildenv"
|
||||||
|
|
||||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||||
|
NPROC:=$(shell nproc)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
docker build -t $(IMAGE) .
|
docker build -t $(IMAGE) .
|
||||||
|
|
||||||
|
build_arm:
|
||||||
|
docker build -t $(IMAGE) --build-arg ARCH=arm64v8 .
|
||||||
|
|
||||||
run:
|
run:
|
||||||
@docker run -it --rm \
|
@docker run -it --rm \
|
||||||
--cap-add SYS_ADMIN --device /dev/fuse --privileged \
|
--cap-add SYS_ADMIN --device /dev/fuse --privileged \
|
||||||
@ -12,5 +16,5 @@ run:
|
|||||||
--mount type=bind,source="$(ROOT_DIR)"/../@docker-ccache,target=/ccache \
|
--mount type=bind,source="$(ROOT_DIR)"/../@docker-ccache,target=/ccache \
|
||||||
--mount type=bind,source="$(ROOT_DIR)"/../@docker-home,target=/home/ubuntu \
|
--mount type=bind,source="$(ROOT_DIR)"/../@docker-home,target=/home/ubuntu \
|
||||||
--mount type=bind,source="$(ROOT_DIR)"/../@docker-build,target=/home/ubuntu/build \
|
--mount type=bind,source="$(ROOT_DIR)"/../@docker-build,target=/home/ubuntu/build \
|
||||||
--env CCACHE_DIR=/ccache --env CTEST_PARALLEL_LEVEL=$(nproc) \
|
--env CCACHE_DIR=/ccache --env CTEST_PARALLEL_LEVEL=$(NPROC) \
|
||||||
--entrypoint /bin/bash $(IMAGE)
|
--entrypoint /bin/bash $(IMAGE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user