mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 13:08:52 +07:00
25 lines
416 B
Makefile
25 lines
416 B
Makefile
.POSIX:
|
|
|
|
TAG = homelab-tools
|
|
|
|
default: check build run
|
|
|
|
check:
|
|
docker info --format '{{ .Plugins.Network }}' | grep 'host'
|
|
|
|
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" \
|
|
--workdir "$(shell pwd)/.." \
|
|
${TAG}
|