Skip to content

Instantly share code, notes, and snippets.

@nicholasdille
Last active June 26, 2019 13:00
Show Gist options
  • Save nicholasdille/49b8dc5897b66752e7622939fb24482d to your computer and use it in GitHub Desktop.
Save nicholasdille/49b8dc5897b66752e7622939fb24482d to your computer and use it in GitHub Desktop.
Containerized tools
alias ansible-playbook="docker container run -it --rm --mount type=bind,source=$(pwd),target=/$(basename $(pwd)) --workdir /$(basename $(pwd)) nicholasdille/ansible"
alias ansible-vault="docker container run -it --rm --mount type=bind,source=$(pwd),target=/$(basename $(pwd)) --workdir /$(basename $(pwd)) --entrypoint ansible-vault nicholasdille/ansible"
alias ansible-galaxy="docker container run -it --rm --mount type=bind,source=$(pwd),target=/$(basename $(pwd)) --workdir /$(basename $(pwd)) --entrypoint ansible-galaxy nicholasdille/ansible"
alias docker-compose="docker container run -it --rm --mount type=bind,source=$(pwd),target=/$(basename $(pwd)) --mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock --workdir /$(basename $(pwd)) docker/compose:1.24.1"
alias golang="docker container run -it --rm --mount type=bind,source=$(pwd),target=/go/src/$(basename $(pwd)) --workdir /go/src/$(basename $(pwd)) golang:1.12"
alias node="docker container run -it --rm --mount type=bind,source=$(pwd),target=/$(basename $(pwd)) --workdir /$(basename $(pwd)) node:12.4.0"
alias npm="docker container run -it --rm --mount type=bind,source=$(pwd),target=/$(basename $(pwd)) --workdir /$(basename $(pwd)) node:12.4.0 npm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment