mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 21:11:52 +07:00
c5602bdb8b
Fix incorrect permission for file created from inside the tools container
25 lines
506 B
Makefile
25 lines
506 B
Makefile
.POSIX:
|
|
|
|
TAG = homelab-tools
|
|
|
|
default: build run
|
|
|
|
build:
|
|
@docker build . --tag ${TAG}
|
|
|
|
run:
|
|
@docker run \
|
|
--rm \
|
|
--interactive \
|
|
--tty \
|
|
--network host \
|
|
--env "TERM=${TERM}" \
|
|
--env "HOME=${HOME}" \
|
|
--volume "${HOME}:${HOME}" \
|
|
--volume "/var/run/docker.sock:/var/run/docker.sock" \
|
|
--volume "/etc/passwd:/etc/passwd" \
|
|
--user "$(shell id -u ${USER}):$(shell id -g ${USER})" \
|
|
--group-add "$(shell getent group docker | cut -d ':' -f 3)" \
|
|
--workdir "$(shell pwd)/.." \
|
|
${TAG}
|