mirror of https://github.com/containers/podman.git
[makefile] disable security labeling instead of using --privileged
$(CURDIR) is mounted in podman as is which causes issues on systems with SELinux as then the container cannot read or write anything inside /src/. This has been worked around with the --privileged flag, but that's a rather brutal solution. Adding :Z is also suboptimal, as that requires a full relabeling after every run. Instead, we disable security labeling via `--security-opt label=disable` for this development container allowing us to run `make vendor-in-container` unprivileged. Signed-off-by: Dan Čermák <dcermak@suse.com>
This commit is contained in:
parent
d68eea6014
commit
dcb4d43570
3
Makefile
3
Makefile
|
@ -285,8 +285,9 @@ vendor:
|
||||||
|
|
||||||
.PHONY: vendor-in-container
|
.PHONY: vendor-in-container
|
||||||
vendor-in-container:
|
vendor-in-container:
|
||||||
podman run --privileged --rm --env HOME=/root \
|
podman run --rm --env HOME=/root \
|
||||||
-v $(CURDIR):/src -w /src \
|
-v $(CURDIR):/src -w /src \
|
||||||
|
--security-opt label=disable \
|
||||||
docker.io/library/golang:1.17 \
|
docker.io/library/golang:1.17 \
|
||||||
make vendor
|
make vendor
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue