Skip to content

Commit

Permalink
Add DOCKER_SOCK Makefile variable
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
  • Loading branch information
frelon committed Nov 23, 2023
1 parent 74e4a42 commit d2360a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PACKER_TARGET?=qemu.elemental-${ARCH}
REPO?=local/elemental-$(FLAVOR)
TOOLKIT_REPO?=local/elemental-toolkit
DOCKER?=docker
DOCKER_SOCK?=/var/run/docker.sock

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

Expand All @@ -69,7 +70,7 @@ clean-iso: build-os
build-disk: build-os
@echo Building ${ARCH} disk
mkdir -p $(ROOT_DIR)/build
$(DOCKER) run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(ROOT_DIR)/build:/build \
$(DOCKER) run --rm -v ${DOCKER_SOCK}:${DOCKER_SOCK} -v $(ROOT_DIR)/build:/build \
--entrypoint /usr/bin/elemental \
${TOOLKIT_REPO}:${VERSION} --debug build-disk --platform $(PLATFORM) --unprivileged --expandable -n elemental-$(FLAVOR).$(ARCH) --local \
--squash-no-compression -o /build ${REPO}:${VERSION}
Expand All @@ -85,7 +86,7 @@ ifneq ("$(PLATFORM)","linux/arm64")
endif
@echo Building ${ARCH} disk
mkdir -p $(ROOT_DIR)/build
$(DOCKER) run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(ROOT_DIR)/examples:/examples -v $(ROOT_DIR)/build:/build \
$(DOCKER) run --rm -v ${DOCKER_SOCK}:${DOCKER_SOCK} -v $(ROOT_DIR)/examples:/examples -v $(ROOT_DIR)/build:/build \
--entrypoint /usr/bin/elemental \
${TOOLKIT_REPO}:${VERSION} --debug build-disk --platform $(PLATFORM) --build-hooks /examples/tumbleweed-rpi --unprivileged --expandable -n elemental-$(FLAVOR).aarch64 --local \
--squash-no-compression --deploy-command elemental,--debug,reset,--reboot,--disable-boot-entry -o /build ${REPO}:${VERSION}
Expand Down

0 comments on commit d2360a1

Please sign in to comment.