Created
June 21, 2018 23:18
-
-
Save mrbobfrog/d4000f66da373c7a37f41f4081692c94 to your computer and use it in GitHub Desktop.
Docker aliases/functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# designed to be sourced -*- shell-script -*- (mode for emacs) | |
# from https://github.com/projectatomic/dockerfile_lint (open shift) | |
alias docker_lint="docker run -it --rm --privileged -v \$PWD:/root/ \ | |
projectatomic/dockerfile-lint \ | |
dockerfile_lint -p -f" | |
# run a client to match the server | |
# based on https://hub.docker.com/_/postgres/ | |
psql_v() { | |
pg_version=$1 | |
db_url=$2 | |
db_user=$3 | |
docker run -it --rm postgres:$pg_version \ | |
psql -h $db_url -U $db_user -W | |
} | |
alias terraform="docker run -it --rm \ | |
-v \$PWD:/root/ -v ~/.aws:/root/.aws \ | |
hashicorp/terraform" | |
alias terraform_0.8.8="docker run -it --rm \ | |
-v \$PWD:/root/ -v ~/.aws:/root/.aws \ | |
hashicorp/terraform:0.8.8" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment