How to install «docker-compose» on Centos/linux?
Docker Compose is a tool for defining and running multi-container Docker applications. With “docker Compose”, you can use a simple config yaml file to configure your application’s services. In this article we will explain how to install “docker-compose” on Centos/Linux machines
On a Centos machine, use the following commands to install “docker-compose”
1 2 3 4 5 6 7 8 9 |
### Download the application specific to your architechture
curl –L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-uname -s –uname -m > /usr/local/bin/docker-compose
##Make it executable
chmod +x /usr/local/bin/docker–compose
|
Now we can verify the version using
1 2 3 4 5 | [root@testlocal ~]# docker-compose -v docker–compose version 1.13.0, build 1719ceb [root@testlocal ~]# |
Please see the installation document here for more details.
Run docker-compose help for more command-line options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | [root@testlocal ~]# docker-compose help Define and run multi–container applications with Docker. Usage: docker–compose [–f <arg>...] [options] [COMMAND] [ARGS...] docker–compose –h|—help Options: –f, —file FILE Specify an alternate compose file (default: docker–compose.yml) –p, —project–name NAME Specify an alternate project name (default: directory name) —verbose Show more output –v, —version Print version and exit –H, —host HOST Daemon socket to connect to —tls Use TLS; implied by —tlsverify —tlscacert CA_PATH Trust certs signed only by this CA —tlscert CLIENT_CERT_PATH Path to TLS certificate file —tlskey TLS_KEY_PATH Path to TLS key file —tlsverify Use TLS and verify the remote —skip–hostname–check Don‘t check the daemon’s hostname against the name specified in the client certificate (for example if your docker host is an IP address) —project–directory PATH Specify an alternate working directory (default: the path of the compose file) |
Please let me know if you have any questions. Always happy to help