Workaround for Linux to perform docker-compose version checking for success when installing docker-compose using curl

Source: Internet
Author: User
Tags curl openssl version

0x0. Origin:

On a new Fedora 25 today, following official documentation, after installing docker-compose using curl, verify that an error occurred when the installation was successful:

The command used for installation is;

Curl-l https://github.com/docker/compose/releases/download/1.14.0-rc2/docker-compose-' uname-s '-' ur/local/bin/ Docker-compose

chmod +x/usr/local/bin/docker-compose

I try to set the file to 777 permissions as well as not solve the problem.

[email protected] bin]# LL
Total 8076
-rwxrwxrwx. 1 root root 8268354 June 14:58 docker-compose

Error:

[Email protected] bin]#./docker-compose
Cannot open Self/usr/local/bin/docker-compose or archive/usr/local/bin/docker-compose.pkg

0x1. Workaround:

Go to the following URL to download the current version:

Https://github.com/docker/compose/releases/tag/1.14.0-rc2

Page pull to the bottom, download:

Docker-compose-linux-x86_64

Then upload the file to the/usr/local/bin/folder and rename it to Docker-compose, modify the permissions for this file, and add the executable: chmod +x/usr/local/bin/docker-compose

And then run

[Email protected] bin]# Docker-compose version
Docker-compose version 1.14.0-rc2, build 24dae73
Docker-py version:2.3.0
CPython version:2.7.13
OpenSSL Version:openssl 1.0.1t 3 May 2016

You can see that there are no more problems.

0x2. Reason:

Use the methods described in the official documentation:

curl -L https://github.com/docker/compose/releases/download/1.14.0-rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-composechmod +x /usr/local/bin/docker-compose

When installing, the files that curl downloads are incomplete and do not give any error messages. I guess it's the problem with HTTPS, and I didn't dig it.

You can see that the file I downloaded via curl is smaller than the size of the file that was downloaded and uploaded to the server by using a browser:

[email protected] bin]# LL
Total 16164
-rwxr-xr-x. 1 root root 8278064 June 15:21 docker-compose
-rwxrwxrwx. 1 root root 8268354 June 14:58 docker-compose-curl

Workaround for Linux to perform docker-compose version checking for success when installing docker-compose using curl

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.