Add tools container back, but better

This commit is contained in:
Khue Doan 2021-04-20 09:41:06 +07:00
parent 400288a786
commit 62ffa5d9b1
2 changed files with 49 additions and 0 deletions

24
tools/Dockerfile Normal file
View File

@ -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"

25
tools/Makefile Normal file
View File

@ -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}