diff --git a/tools/Dockerfile b/tools/Dockerfile new file mode 100644 index 00000000..ab1306a9 --- /dev/null +++ b/tools/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine + +RUN apk add --no-cache \ + ansible \ + curl \ + docker-cli \ + hugo \ + git \ + go \ + make \ + neovim \ + openssh \ + python3 \ + rust \ + tree \ + zsh + +RUN apk add --no-cache --repository "http://dl-cdn.alpinelinux.org/alpine/edge/testing" \ + helm \ + kubectl \ + lxd \ + terraform + +ENTRYPOINT "/bin/zsh" diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 00000000..d88a46ca --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,25 @@ +.POSIX: + +TAG = homelab-tools + +default: check build run + +check: + command -v docker + docker info --format '{{ .Plugins.Network }}' | grep 'host' + +build: + docker build . --tag ${TAG} + +run: + docker run \ + --rm \ + --interactive \ + --tty \ + --env "TERM=${TERM}" \ + --env "HOME=${HOME}" \ + --volume "${HOME}:${HOME}" \ + --volume "/var/run/docker.sock:/var/run/docker.sock" \ + --user "$(shell id -u ${USER}):$(shell id -g ${USER})" \ + --workdir "$(shell pwd)/.." \ + ${TAG}