| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Various cloud utils (AWS CLI, aws-shell, awscli-login, Azure CLI, Terraform) in one Docker container.
This is a base Python 3.7 base image that runs updates, sets timezone to Eastern, and installs the following:
Optionally installed (added at runtime based on config):
Clone this repository down and go into the directory:
git clone https://github.com/CU-CommunityApps/ct-cloud-utils-dockerized.git
cd ct-cloud-utils-dockerizedNote: If you have an existing folder with files you want to use this with, copy the docker-compose.yml file to your folder and then proceed
This will set some environment variables and if you haven't already set up awscli-login it will create a default config
Edit the docker-compose.yml file to set your preferences
Bring a persistent container up:
docker-compose up --detachAttach to a shell:
docker-compose exec cloud-utils configure-cloud-utilsNote: Last 2 steps can be called together:
docker-compose up --detach && docker-compose exec cloud-utils configure-cloud-utilsYou should now be able to run commands from any of the installed utilities (including aws, aws login, aws-shell, azure, and terraform)
Note: The container will remain running unless you manually stop it (this is useful if you want to return to a session with your prior setup, bash history, etc.) - reaatch to it with the following command:
docker-compose exec cloud-utils bashStopping the container (after exiting it):
docker-compose downCheck if you have any running containers:
docker-compose psAlternative command to bring up a container that removes itself on exit:
docker-compose run --rm cloud-utils configure-cloud-utilsNote: If you want your container to persist, remove the --rm flag from the commands below
This command will mount your current directory as the working directory in the container:
docker run --rm -it \
-e SETUP_AWSCLI_LOGIN=true \
-e DUO_FACTOR="auto" \
-e NETID="" \
-e SETUP_OHMYZSH=true \
-e SETUP_FX=false \
-v $HOME/.aws:/root/.aws \
-v $HOME/.aws-login:/root/.aws-login \
-v $PWD:/mounted-home \
-w /mounted-home \
mikesprague/cloud-utilsYou can also alias the same command in your bash/zsh profile (bash via ~/.profile or ~/.bashrc or Zsh via ~/.zshrc) to simplify reuse:
alias cloud-utils="docker run --rm -it \
-e SETUP_AWSCLI_LOGIN=true \
-e DUO_FACTOR="auto" \
-e NETID="" \
-e SETUP_OHMYZSH=true \
-e SETUP_FX=false \
-v $HOME/.aws:/root/.aws \
-v $HOME/.aws-login:/root/.aws-login \
-v $PWD:/mounted-home \
-w /mounted-home \
mikesprague/cloud-utils"☝️ The above snippet will make the command cloud-utils available in your shell and start the container in whatever directory you run the cloud-utils command
| Back | FazBrowse Home | New Git URL |