'How to alias docker-compose to docker compose?
From my understanding, docker compose
is the latest version. This is the one at least I installed from docker official documentation.
I am working on a project that user docker-compose
in their makefile.
How could I forward all the calls (and their arguments) from docker-compose
to docker compose
?
I created an alias:
alias docker-compose="docker compose"
It works fine in terminal. But not in the make file.
Solution 1:[1]
One solution I've come up with is to create a little script.
File: /bin/docker-compose
Content:
docker compose "$@"
To make the script executable: sudo chmod +x /bin/docker-compose
.
You can check it with docker-compose version
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ado Ren |