Skip to content

Commit

Permalink
local/linux: run container in privileged mode
Browse files Browse the repository at this point in the history
Running systemd service in a container is not very common. We use it for testing, however it has its disadvantages.
Some container runtimes prohibit creating UTS namespaces. That leads to a warning:
"forwarder.service: ProtectHostname=yes is configured, but UTS namespace setup is prohibited (container manager?), ignoring namespace setup."
Giving a container privileged mode fixes this issue.
  • Loading branch information
Choraden authored and mmatczuk committed Apr 8, 2024
1 parent 79703de commit 31f7ce4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fedora: forwarder.rpm

.PHONY: .up
.up:
@podman run -p 3128:3128 -d -v ./forwarder.$(EXT):/forwarder.$(EXT) --name forwarder-testing --replace $(IMG)
@podman run -p 3128:3128 -d -v ./forwarder.$(EXT):/forwarder.$(EXT) --privileged --name forwarder-testing --replace $(IMG)
@podman exec forwarder-testing $(INSTALL_CMD) "/forwarder.$(EXT)"
@podman cp ./forwarder.yaml forwarder-testing:/etc/forwarder/forwarder.yaml
@podman exec forwarder-testing systemctl start forwarder
Expand Down

0 comments on commit 31f7ce4

Please sign in to comment.