1. Online installation Currently only tried the Linux x86 architecture online installation 1. Download docker-compose Download docker-compose to /usr/local/bin/ $ sudo curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose 2. Give docker-compose execution permissions $ sudo chmod +x /usr/local/bin/docker-compose 3. Verify [root@localhost bin]# docker-compose -version docker-compose version 1.21.2, build e7de1bc 2. Offline installation (I) Linux x86 installation process of docker-compose Method 1. Install using binary files For linux x86, just download the docker-compose binary file of the corresponding linux version from https://github.com/docker/compose/releases to your local computer and send it to linux, then copy it to /usr/local/bin/ and you can use it normally. Method 2. Compile and install using Python Download the dockerCompoes source code from github. Then follow these steps:
2. Other system installation processes without binary files The docker-compose binary files for some architectures are not officially provided and need to be compiled and installed manually. Other official ones also need to be compiled and installed manually using Python After trying, I found that it seems that only using python compilation can be successfully installed, and the following three methods all failed. Compile and install using Python Use docker-compose github source code and python compile and install.
Report an error It keeps reporting requests10 version error. I deleted version 10 and changed to version 16. It also reports requests2.14 or above, which is required by docker. This means that the downloaded docker-compose source version does not correspond to the installed docker version. Download and check the requests version in the requirements.txt file under the source code, find the version corresponding to the installed docker, and then install it again. The texttable version is reported to be incorrect again. Moreover, it cannot be downloaded automatically without a network connection. You can only manually go to https://pypi.org/project/texttable/ to find the corresponding version, download, compile and install it. Fix missing dependencies For such problems with missing dependencies, you need to download it from the Python official website and then compile and install it. An example: Install the two dependencies, requests and texttable, and make sure that docker-compose corresponds to the docker version. Continue to compile and install Python
Error:
Reason: The docker version under python is wrong. Go to https://pypi.python.org/simpl... again and compile and install Enter the downloaded python docker3.3.0 directory and execute the command python setup.py install
Enter the docker-compose-1.21.2 directory again Install docker-compose using python [root@localhost docker-3.3.0]# cd ../docker-compose-1.21.2/ [root@localhost docker-compose-1.21.2]# ls build compose dist LICENSE README.rst setup.cfg tests CHANGELOG.md contrib docker_compose.egg-info MANIFEST.in requirements-dev.txt setup.py tox.ini CHANGES.md CONTRIBUTING.md Dockerfile [root@localhost docker-compose-1.21.2]# python setup.py install Finally, the installation is successful and it shows:
4. Establish a soft connection [root@localhost bin]# ln -s /usr/bin/docker-compose /usr/local/bin/docker-compose 5. Verify [root@localhost bin]# docker-compose -version docker-compose version 1.21.2, build e7de1bc 3. Others How to install python modules through setup.py
Other failed installation attempts 2. Use dep to install and download the corresponding dep installation package, unzip the data file, put docker-compose in /usr/local/bin, and execute the error: /usr/bin/python3: bad interpreter looking for mirror, no available mirror found 3. Make installation When I started to use make to install, I found that the configuration file usually compiled and installed under Linux was missing. I used ./configuration and it reported an error that the file could not be found. This concludes this article about various ways to install Docker Compose in different environments. For more information about various ways to install Docker Compose, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL learning record: bloody incident caused by KEY partition
>>: Vue template compilation details
The Linux seq command can generate lists of numbe...
It is really not easy to do a good reconstruction...
1. Introduction When we are writing a page, we so...
When you log in to MySQL remotely, the account yo...
Definition and Usage The <input> tag is use...
Table of contents 1. Prepare the springboot proje...
swarm three virtual machines 132,133,134 1. Initi...
Let's take a look at my error code first. htm...
MySQL 5.0 has become a classic because of its few...
This article shares the specific code for JavaScr...
Preface After a failover occurs, a common problem...
The so-called cascading replication is that the m...
Table of contents 1. Preparation 2. Decompression...
Basically all e-commerce projects have the functi...
Basic concepts of consul Server mode and client m...