Site Loader
Auckland, New Zealand
So far in ExecuteAutomation, we discussed about Docker a lot ranging from In this post we will understand and work with Docker compose.

What is Docker Compose?

  • Compose is a tool for defining and running multi-container Docker applications.
  • With Compose, you use a Compose file to configure your application’s services. Then, using a single command, you create and start all the services from your configuration
  • Compose is great for development, testing, and staging environments, as well as CI workflows

Docker compose manages Services

Docker compose commands helps to
  • Start, stop and rebuild services
  • View the status, logs of running services

Docker as CI?

  • An important part of any Continuous Deployment or Continuous Integration process is the automated test suite. Automated end-to-end testing requires an environment in which to run tests.
  • Compose provides a convenient way to create and destroy isolated testing environments for your test suite using compose file

What is Compose files?

Docker compose file is like a configuration file, where you define all the different stuffs we perform on command line (via powershell) into an file. But you can do more than what you do in command line as well The file is basically an Yaml file (.yml)

Here are the complete videos of the above discussion An Introduction to Docker Compose  Working with multiple containers using Docker compose Thanks for reading the post and watching the video!!! Please leave your comments and let me know if there is anything I should update in this post. Thanks, Karthik KK

Post Author: Karthik kk

2 Replies to “Understanding and working with Docker compose”

  1. Hi,
    I’m facing the following error while writing the yml file. Can anyone please help me with it?

    tushar@l-tushar:~/Documents/Dockers/wordpress$ docker-compose up
    ERROR: In file ‘./docker-compose.yml’ service ‘MYSQL_ROOT_PASSWORD’ doesn’t have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.

    Yml file

    version: ‘2’

    services:

    wordpress:
    image: wordpress
    ports:
    – 9080:80
    environment:
    WORDPRESS_DB_PASSWORD: admin123

    mysql:
    image: mysql:latest
    environment:
    MYSQL_ROOT_PASSWORD: admin123

    Thanks!!!

Leave a Reply to varshaa Cancel reply

Your email address will not be published. Required fields are marked *