How To Get Over A Weight Loss Plateau

Being stuck at the same weight for several weeks can be very discouraging. I have been stuck at the same weight for several weeks, that is not a plateau this is my new self. And it sucks. Weight loss…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Introduction to Docker Compose

Docker is an amazing containerisation solution that can help you ship your code seamlessly, irrespective of the environment it runs on. Docker provides the ability to package and run an application in a loosely isolated environment called a container.

The backbone of delivering a Docker container is docker-compose. As a developer, you can use the docker-compose command to design and run multi-container Docker applications.

Using docker-compose involves 2 steps,

docker-compose takes a .yml file and executes the “recipe” stored within it. By default it looks for a docker-compose.yml file in the current directory. A typical docker-compose.yml file looks like,

Here, we have 2 containers running in our app, namely, SQL Server and Adminer.

The containers in the app can access each other via the names. For eg. from the above .yml file, to access SQL Server you may use sql-server:1433.

Docker hub images come with certain environment variables that you can configure to your requirement, for eg. in the above .yml file we have configured a service account password. Explore the documentation of the Docker image being used to understand what configuration options it makes available to you.

Main sections of a docker-compose file,

Container level options,

A few commonly used docker-compose commands,

Create & Start containers

List the containers

Delete a stopped container

Specify a .yml file

Full list of options available with docker-compose

That concludes this introduction to docker-compose

You may also like,

Add a comment

Related posts:

Is something wrong with me?

For a long time I thought something was wrong with me. Because why did I sometimes find it so tiring to go to social occasions? And why did I find it so difficult to talk about simple things like the…

The Story of Jobs and Infrastructure in Downtown Dallas

A few years back a fellow Coalition for a New Dallas member found a study by a Harvard Professor John Kain critiquing studies in the 1970’s and 1980’s that were used to justify rail investment in…