1. What is Docker Compose?
2. Docker Compose installation steps1. Download the Docker Compose binary file. The version I downloaded here is 1.29.2
2. Add executable permissions to the binary file just downloaded
3. Check whether the installation is successful through the 3. Docker Compose version differences
Note: The official has introduced a new --compatibility flag in 1.20.0 to help developers easily transition to v3. There are still some issues that the official does not recommend using directly in production. It is recommended that you directly use the v3 version. 4. Docker Compose basic commandsThe Docker Compose command is basically the same as Docker, mainly for Docker Compose lifecycle control, log format and other related commands. You can view the help through docker-compose --help. #Build and start the nginx container docker-compose up -d nginx #Enter the nginx container docker-compose exec nginx bash #The container started by the UP command will be stopped and the container will be deleted docker-compose down #Show all containers docker-compose ps #Restart the nginx container docker-compose restart nginx #Build nginx image docker-compose build nginx #Build nginx image without cache docker-compose build --no-cache nginx #View nginx logs docker-compose logs nginx #View nginx's real-time logs docker-compose logs -f nginx #Verify (docker-compose.yml) file configuration, #When the configuration is correct, nothing is output. When the file configuration is wrong, error information is output docker-compose config -q #Output nginx's docker log in json format docker-compose events --json nginx #Pause the nginx container docker-compose pause nginx #Restore ningx container docker-compose unpause nginx #Delete the nginx container docker-compose rm nginx #Stop the nginx container docker-compose stop nginx #Start the nginx container docker-compose start nginx 5. For use cases, please refer to "Hand-in-hand teaching you to build gitlab community Chinese version with Docker" This is the end of this article about the installation and use of Docker Compose. For more information about the installation and use of Docker Compose, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue.js handles Icon icons through components
>>: 10 Things Excellent Web Developers Must Know to Improve Their Development Skills
This article is mainly for those who do not under...
closure service nginx stop systemctl stop nginx s...
Preface Recently, I encountered a program using S...
To beautify the table, you can set different bord...
This article uses an example to describe how to u...
Uninstall the installed version on Ubuntu: sudo a...
There are two types of MySQL installation files, ...
It was found in the test that when the page defini...
Table of contents 1. JavaScript issues 2. Advanta...
Under Linux, if you download and install an appli...
Table of contents Typical waterfall website Water...
I saw a good idea and recorded it. I have used jQ...
Pre-installation work: Make sure vmware workstati...
After IntelliJ IDEA deploys a Javaweb project usi...
Using the html-webpack-plugin plug-in to start th...