Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use docker compose

Shulou Source: shulou.com Published: 2022-06-03 04:51:35 09月21日 Update

This article is to share with you the use of docker compose, I believe that most people have not yet learned this skill, in order to let you learn, for you to sum up the following content, say no more, let's read on.

Stop the docker container and empty it.

Cat > docker-compose.yml

Redis:

Image: redis

Db:

Image: postgres:9.4

Vote:

Image: voting-app

Ports:

-5000Rank 80

Links:

-redis

Worker:

Image: worker-app

Links:

-db

-redis

Result:

Image: result-app

Ports:

-5001PUR 80

Links:

-db

Docker-compose up-d

It's all up. I feel like I don't want K8s with docker compose.

Both the front and rear ends are displayed normally.

After reading the above, have you mastered how to use docker compose? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Content usage methods skills more most containers feelings read articles industry information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei Apple vpn MySQL