August 2017
Intermediate to advanced
332 pages
9h 16m
English
The docker-compose command reads the definition file and creates the environment:
$ docker-compose up -d
The command started two containers, calculator and redis in the background (-d option). We can check that the containers are running:
$ docker-compose ps Name Command State Ports ---------------------------------------------------------------------------project_calculator_1 java -jar app.jar Up 0.0.0.0:8080->8080/tcpproject_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
The container names are prefixed with the project name project, which is taken from the name of the directory in which the docker-compose.yml file is placed. We could specify the project name manually using the -p <project_name> option. ...
Read now
Unlock full access