How I run the AWS CLI in docker

Yachts

I didn't want to download the AWS CLI client over and over, so I wrote a tiny wrapper script to run it in a docker container. I don't use it a lot as setting up shell completions is a pain, but it can be useful.

Raw
#!/usr/bin/env bash

rootdir="${HOME}/.config/aws-cli-root"
if [[ ! -d "${rootdir}" ]]; then
  echo "${rootdir} does not exist"
  exit 1
fi
# shellcheck disable=SC2068
docker run -it -v "${rootdir}":/root/.aws amazon/aws-cli $@

0 comments

Reply

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.
DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo