Skip to content

Commit fbdf673

Browse files
authored
Merge pull request #40168 from aravindhp/makefile-selinux-fix
Fix container-serve on SELinux systems
2 parents 2056e6a + a61f8b7 commit fbdf673

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ CONTAINER_ENGINE ?= docker
99
IMAGE_REGISTRY ?= gcr.io/k8s-staging-sig-docs
1010
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile | cut -c 1-12)
1111
CONTAINER_IMAGE = $(IMAGE_REGISTRY)/k8s-website-hugo:v$(HUGO_VERSION)-$(IMAGE_VERSION)
12-
CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src"
12+
# Mount read-only to allow use with tools like Podman in SELinux mode
13+
# Container targets don't need to write into /src
14+
CONTAINER_RUN = "$(CONTAINER_ENGINE)" run --rm --interactive --tty --volume "$(CURDIR):/src:ro,Z"
1315

1416
CCRED=\033[0;31m
1517
CCEND=\033[0m

0 commit comments

Comments
 (0)