How to alias docker-compose to docker compose?

One solution I’ve come up with is to create a little script.

File: /bin/docker-compose

Content:

docker compose "$@"

Alternatively, in order to respect previous container naming convention (with underscore delimiter _ over -):

docker compose --compatibility "$@"

To make the script executable: sudo chmod +x /bin/docker-compose.

You can check it with docker-compose version.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)