Get the latest version of Docker Compose on Docker Compose release page
curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
sudo rm /usr/local/bin/docker-compose
docker-compose up -d
Note: When running
docker-compose in background, you may want to stop services after you have done your work by using command:
--volumes to remove volumes using by your containers.
Normally, you must be inside a docker-compose project with
docker-compose.yaml file in order to user most of
docker-compose command, or you can use
docker-compose -f <path/to/docker-compose-file> <command> to run command on specific docker-compose project.
Project name is used with your service name to create container name: Container Name = Project Name_Service Name_1
By default, project name is the name of the directory which contains docker-compose file.