Skip to main content

Posts

Showing posts from October, 2018

docker-compose useful commands

A short list of useful docker-compose commands In this article we will cover a useful list of docker-compose commands to get started with docker compose. Starting containers The most popular command is the docker-compose up command. This command is used to run services defined in the docker compose file. When this command is cancelled, all running containers are stopped. When run without arguments, it creates containers for all services defined in the compose file and uses a file named docker-compose.yml. This is the default file used by docker compose. There are many avalaible options but we will cover only the most used in this article.The up command Options 1. -f This option is used to specify the docker compose file to use. If your file is named docker-compose.yml, this option is not needed. See a full example below. docker-compose up -f [file name] Note: This option can be used multiple times to specify multiple compose file. WHen multiple compose files are used, their configur…