1. Offline installationhttps://github.com/docker/compose/releases Move files
Modify the file name
Grant execution permissions to docker-compose. By default, there is no execute permission.
Whether the test is successful
2. Online installationrun
Install a different version and modify the version number to 1.29.2. If you encounter curl problems, use pip to install
Without virtualenv implement
Grant execution permissions to docker-compose. By default, there is no execute permission. In /usr/local/bin
Whether the test is successful
3. Uninstall
Installed using pip
4. Define the yml file1. Download the nginx image
2. Write the docker-compose.yml file. Pay attention to the format of the YML file. version: '3' #version number services: #docker container nginx: #container name container_name: nginx-1 #customize the container name after startup restart: always #Set to always, indicating that this container should always restart when stopped image: nginx:latest #image name: version number ports: #startup port number - 4433:80 volumes: #Data volume, mapping files in the container to the server - ./conf.d:/etc/nginx/conf.d environment: #Environment configuration TZ: Asia/shanghai 3. Start. Under the yml file
This is the end of this article about docker-compose installation and yml file configuration. For more relevant docker-compose yml file configuration content, please search 123WORDPRESS.COM's previous articles 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 codemirror realizes the effect of online code compiler
>>: MySQL executes commands for external sql script files
0. New operation: mkdir abc #Create a new folder ...
A root routing component (the root routing compon...
First, you can open Moments and observe several l...
Table of contents 1. Filter unique values 2. Shor...
Introduction to Vue The current era of big front-...
1.This points to 1. Who calls whom? example: func...
Preface mysqlslap is a diagnostic program designe...
When using apt-get to install, it will be very sl...
This article uses a specific example to introduce...
Table of contents [See an example]: [The original...
This article example shares the specific code of ...
ps: The environment is as the title Install possi...
When it comes to understanding web design, many p...
Table of contents Hidden, descending, and functio...
In the previous blog, we learned about the usage ...