Skip to content

Instantly share code, notes, and snippets.

@elreydetoda
Created September 21, 2020 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elreydetoda/a52dc42112017209647e8ff72f174dea to your computer and use it in GitHub Desktop.
Save elreydetoda/a52dc42112017209647e8ff72f174dea to your computer and use it in GitHub Desktop.
mapfile -t env_varz < <(env | grep -iE 'packet|tf_|vagrant_|circle|release' | cut -d '=' -f 1)
IFS=" " read -r -a env_vars_array <<< "$(printf ' -e %s' "${env_varz[@]}")"
docker container run --rm -it "${env_vars_array[@]}" -v "${PWD}/scripts":/scripts bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment