-
Notifications
You must be signed in to change notification settings - Fork 12
/
Docker.mk
28 lines (19 loc) · 913 Bytes
/
Docker.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
DOCKER_IMAGE := apx-gcs-linux
DOCKER_PROJECT_DIR := /gcs
DOCKER_FUSE := --cap-add SYS_ADMIN --cap-add MKNOD --device /dev/fuse:mrw --privileged
docker-image:
@docker stop $(DOCKER_IMAGE); docker rm -f $(DOCKER_IMAGE); echo ""
docker build -t uavos/$(DOCKER_IMAGE) - < Dockerfile
docker-images:
@docker stop $(DOCKER_IMAGE); docker rm -f $(DOCKER_IMAGE); echo ""
docker buildx build --platform linux/amd64,linux/arm64 -t uavos/$(DOCKER_IMAGE) .
docker-run:
@docker run -it -v $(realpath $(CURDIR))/:$(DOCKER_PROJECT_DIR) -w $(DOCKER_PROJECT_DIR) $(DOCKER_FUSE) uavos/$(DOCKER_IMAGE) bash
docker-push:
@docker push uavos/$(DOCKER_IMAGE)
docker-pull:
@docker pull uavos/$(DOCKER_IMAGE)
docker-commit:
@docker commit $(DOCKER_IMAGE) uavos/$(DOCKER_IMAGE)
docker-%:
@docker run -it -v $(realpath $(CURDIR))/:$(DOCKER_PROJECT_DIR) -w $(DOCKER_PROJECT_DIR) $(DOCKER_FUSE) uavos/$(DOCKER_IMAGE) make $*