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 28, 2023
1 parent 677a528 commit 7e7703c
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 @@ -14,6 +14,7 @@ TOOLKIT_REPO?=local/elemental-toolkit
DOCKER?=docker
BASE_OS_IMAGE?=opensuse/leap
BASE_OS_VERSION?=15.5
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 @@ -74,15 +75,15 @@ 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)

.PHONY: build-disk
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 @@ -98,7 +99,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) --cloud-init-paths /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 7e7703c

Please sign in to comment.