Skip to content

Commit

Permalink
chore: handle selinux when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rbjorklin committed Oct 24, 2021
1 parent 4f24734 commit 9e1122e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
BINARY = throttle_fstrim
PROFILE ?= dev
DOCKER = $(shell bash -c 'basename $$(which podman 2> /dev/null) 2> /dev/null || echo docker')
SELINUX = $(shell bash -c '( [ "$$(getenforce)" = "Enforcing" ] && echo -n ":z") || echo -n ""')

.PHONY: deps build image

Expand All @@ -17,4 +18,4 @@ clean:
rm -rf _build

docker-%: image
$(DOCKER) run --rm -ti --volume $(PWD):/build --workdir /build throttle-fstrim-build make $* PROFILE=$(PROFILE)
$(DOCKER) run --rm -ti --volume $(PWD):/build$(SELINUX) --workdir /build throttle-fstrim-build make $* PROFILE=$(PROFILE)

0 comments on commit 9e1122e

Please sign in to comment.