Skip to content

Commit d10a41a

Browse files
authored
ensure ${DL_DIR} exists before bind-mounting it to prevent permission issues (#1061)
Co-authored-by: Lukáš Mojžíš <lukas.mojzis@grenames.cz>
1 parent 5b2e3a1 commit d10a41a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile.docker

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CONTAINER_ENGINE ?= $(shell command -v podman 2>/dev/null || command -v docker 2
66
USER_ID := $(shell id -u)
77
GROUP_ID := $(shell id -g)
88
USERNAME := builder
9+
DL_DIR := dl
910

1011
# Directories
1112
WORKSPACE_DIR := $(shell pwd)
@@ -19,7 +20,7 @@ endif
1920

2021
CONTAINER_RUN_OPTS := \
2122
-v $(WORKSPACE_DIR):/home/$(USERNAME) \
22-
-v $(shell readlink -f dl):/home/$(USERNAME)/dl \
23+
-v $(shell [ -e ${DL_DIR} ] || mkdir -p ${DL_DIR} && readlink -f ${DL_DIR}):/home/$(USERNAME)/dl \
2324
-w /home/$(USERNAME) \
2425
-e TERM=xterm-256color
2526

0 commit comments

Comments
 (0)