From 2c8b55dd1749872799e6b4c9cfa8bb9f16d827a3 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Mon, 27 Nov 2023 10:41:54 -0800 Subject: [PATCH] chore: allow `make docker-generate` to work with SELINUX Without this change when running on a system using SELINUX you will receive an error like this: ts=2023-11-27T15:48:48.150Z caller=net_snmp.go:175 level=info msg="Loading MIBs" from=mibs ts=2023-11-27T15:48:48.150Z caller=main.go:134 level=error msg="Error generating config netsnmp" err="unable to determine absolute path for output" make: *** [Makefile:92: docker-generate] Error 1 Information on the ':Z' option at: https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label Signed-off-by: John L. Villalovos --- generator/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/Makefile b/generator/Makefile index c1a45c18..a70238a4 100644 --- a/generator/Makefile +++ b/generator/Makefile @@ -89,7 +89,7 @@ docker: .PHONY: docker-generate docker-generate: docker mibs - docker run -ti -v "${PWD}:/opt/" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)" generate + docker run -ti -v "${PWD}:/opt/:Z" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)" generate .PHONY: docker-publish docker-publish: @@ -349,4 +349,4 @@ $(MIBDIR)/readynas: $(MIBDIR)/readydataos: @echo ">> Downloading readydataos" - @curl $(CURL_OPTS) -o $(MIBDIR)/readydataos "$(READYDATAOS_URL)" \ No newline at end of file + @curl $(CURL_OPTS) -o $(MIBDIR)/readydataos "$(READYDATAOS_URL)"