Skip to content

Commit d2360a1

Browse files
committed
Add DOCKER_SOCK Makefile variable
Signed-off-by: Fredrik Lönnegren <[email protected]>
1 parent 74e4a42 commit d2360a1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PACKER_TARGET?=qemu.elemental-${ARCH}
1212
REPO?=local/elemental-$(FLAVOR)
1313
TOOLKIT_REPO?=local/elemental-toolkit
1414
DOCKER?=docker
15+
DOCKER_SOCK?=/var/run/docker.sock
1516

1617
GIT_COMMIT ?= $(shell git rev-parse HEAD)
1718
GIT_COMMIT_SHORT ?= $(shell git rev-parse --short HEAD)
@@ -57,7 +58,7 @@ push-os:
5758
build-iso: build-os
5859
@echo Building ${ARCH} ISO
5960
mkdir -p $(ROOT_DIR)/build
60-
$(DOCKER) run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(ROOT_DIR)/build:/build \
61+
$(DOCKER) run --rm -v ${DOCKER_SOCK}:${DOCKER_SOCK} -v $(ROOT_DIR)/build:/build \
6162
--entrypoint /usr/bin/elemental ${TOOLKIT_REPO}:${VERSION} --debug build-iso --bootloader-in-rootfs -n elemental-$(FLAVOR).$(ARCH) \
6263
--local --platform $(PLATFORM) --squash-no-compression -o /build $(REPO):$(VERSION)
6364

@@ -69,7 +70,7 @@ clean-iso: build-os
6970
build-disk: build-os
7071
@echo Building ${ARCH} disk
7172
mkdir -p $(ROOT_DIR)/build
72-
$(DOCKER) run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(ROOT_DIR)/build:/build \
73+
$(DOCKER) run --rm -v ${DOCKER_SOCK}:${DOCKER_SOCK} -v $(ROOT_DIR)/build:/build \
7374
--entrypoint /usr/bin/elemental \
7475
${TOOLKIT_REPO}:${VERSION} --debug build-disk --platform $(PLATFORM) --unprivileged --expandable -n elemental-$(FLAVOR).$(ARCH) --local \
7576
--squash-no-compression -o /build ${REPO}:${VERSION}
@@ -85,7 +86,7 @@ ifneq ("$(PLATFORM)","linux/arm64")
8586
endif
8687
@echo Building ${ARCH} disk
8788
mkdir -p $(ROOT_DIR)/build
88-
$(DOCKER) run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(ROOT_DIR)/examples:/examples -v $(ROOT_DIR)/build:/build \
89+
$(DOCKER) run --rm -v ${DOCKER_SOCK}:${DOCKER_SOCK} -v $(ROOT_DIR)/examples:/examples -v $(ROOT_DIR)/build:/build \
8990
--entrypoint /usr/bin/elemental \
9091
${TOOLKIT_REPO}:${VERSION} --debug build-disk --platform $(PLATFORM) --build-hooks /examples/tumbleweed-rpi --unprivileged --expandable -n elemental-$(FLAVOR).aarch64 --local \
9192
--squash-no-compression --deploy-command elemental,--debug,reset,--reboot,--disable-boot-entry -o /build ${REPO}:${VERSION}

0 commit comments

Comments
 (0)