Skip to content

Instantly share code, notes, and snippets.

@withakay
Created February 10, 2023 08:32
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 withakay/164cb772f976ee2d1aa2183b1b2fb5d5 to your computer and use it in GitHub Desktop.
Save withakay/164cb772f976ee2d1aa2183b1b2fb5d5 to your computer and use it in GitHub Desktop.
docker-compose alias
#!/usr/bin/env bash
#
# For use on systems where you might want a global alias to `docker compose`.
#
# If you just need an alias for your own user a shell alias in your profile probably makes more sense.
#
# If you need compatability with the docker-compose v1 container naming convention
# (with underscore delimiter _ over -), you can add the --compatability flag to the below commands.
#
# 'docker compose --compatability "$@"'
#
# create a docker-compose alias
echo 'docker compose "$@"' \
| sudo tee -a /usr/local/bin/docker-compose \
&& sudo chmod +x /usr/local/bin/docker-compose
# create a doco alias
echo 'docker compose "$@"' \
| sudo tee -a /usr/local/bin/doco \
&& sudo chmod +x /usr/local/bin/doco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment