Skip to content

Commit

Permalink
chore: allow make docker-generate to work with SELINUX
Browse files Browse the repository at this point in the history
Without this change when running on a system using SELINUX you will
receive an error like this:

<snip>
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 <[email protected]>
  • Loading branch information
jvillal-amp committed Nov 27, 2023
1 parent d404ca5 commit 2c8b55d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -349,4 +349,4 @@ $(MIBDIR)/readynas:

$(MIBDIR)/readydataos:
@echo ">> Downloading readydataos"
@curl $(CURL_OPTS) -o $(MIBDIR)/readydataos "$(READYDATAOS_URL)"
@curl $(CURL_OPTS) -o $(MIBDIR)/readydataos "$(READYDATAOS_URL)"

0 comments on commit 2c8b55d

Please sign in to comment.