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
Table of contents 1. We must ensure that the vue/...
Preface Let me share with you how to make a searc...
In front-end development, there are many ways to ...
(1) Each HTML tag has an attribute style, which c...
principle Set a shadow on the element when hoveri...
Table of contents Version Notes Create a project ...
Benefits of a programmatic approach 1. Global con...
1.docker search mysql查看mysql版本 2. docker pull mys...
Today's Tasks 1. Choice of Linux distribution...
Table of contents 1. Background 2. Prerequisites ...
The content of the written Dockerfile is: FROM py...
Table of contents background 1) Enable the keepch...
The so-called connection limit in Nginx is actual...
In the past few years, I have been moving back an...
Preface This article introduces the fifth questio...