Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support ARM64 binary downloads #7472

Closed
CorruptComputer opened this issue May 19, 2020 · 33 comments
Closed

Please support ARM64 binary downloads #7472

CorruptComputer opened this issue May 19, 2020 · 33 comments
Assignees
Labels

Comments

@CorruptComputer
Copy link

Description of the issue

Docker Compose fails to run with the following error:

user@hostname:~$ sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0     38      0 --:--:-- --:--:-- --:--:--    38
user@hostname:~$ sudo chmod +x /usr/local/bin/docker-compose
user@hostname:~$ docker-compose
/usr/local/bin/docker-compose: line 1: Not: command not found

Context information (for bug reports)

Output of docker-compose version

Unable to run docker-compose

Output of docker version

user@hostname:~$ docker version
Client: Docker Engine - Community
 Version:           19.03.9
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        9d98839
 Built:             Fri May 15 00:25:48 2020
 OS/Arch:           linux/arm64
 Experimental:      false
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied

Output of docker-compose config
(Make sure to add the relevant -f and other flags)

Unable to run docker-compose

Steps to reproduce the issue

  1. Install docker-compose using Linux instructions from docs: https://docs.docker.com/compose/install/
  2. Try to run it
  3. CRASH

Observed result

The software crashes when trying to run it.

Expected result

The software would run successfully.

Stacktrace / full error message

/usr/local/bin/docker-compose: line 1: Not: command not found

Additional information

Running OS: Ubuntu Server 20.04 LTS

@CorruptComputer
Copy link
Author

Also before someone says "it says the command isn't found, you need to download and install the binary" that error is from RUNNING the file. This is the output if the file doesn't exist:

user@hostname:~$ sudo rm /usr/local/bin/docker-compose 
user@hostname:~$ docker-compose

Command 'docker-compose' not found, but can be installed with:

sudo apt install docker-compose

@syntapy
Copy link

syntapy commented May 20, 2020

This is not a bug in docker-compose

Check your PATH variable and make sure /usr/local/bin is in there

sudo echo $PATH

If not, add it to /root/.bashrc or something

Also I've always had to use sudo docker-compose which probably makes sense if you need sudo permissions to access docker itself

@CorruptComputer
Copy link
Author

I KNEW someone would say that, which is why I made the above comment. It is finding the downloaded file, the error is with running it, not with not finding it. Please read what I previously said.

@syntapy
Copy link

syntapy commented May 20, 2020

Hahaha! My bad

Yeah I misread that

Right, it says line 1: Not: Command not found so its happening in the code

What OS and architecture are you on? On my machine it works on a fresh debian VM without docker.

EDIT:
Its not this issue, since its actually downloading on your machine it seems...I wonder if docker-compose requires any external libraries that might be missing on your machine

@CorruptComputer
Copy link
Author

Ah, that does seem to be the same issue. Let me try the steps in the answer to see if that fixes it.

Thanks!

@CorruptComputer
Copy link
Author

CorruptComputer commented May 20, 2020

The OS is Ubuntu Server 20.04 and architecture is ARM64.

EDIT: Actually after running uname -m it comes out as aarch64. Which is the same as ARM64, just the linux-y way of saying it.

@syntapy
Copy link

syntapy commented May 20, 2020

Yeah, unfortunately doesnt seem like they post binaries for arm.

I have no idea how hard it would be to compile for source, but seems like they do support at least arm32, although someone had trouble doing so

I did find this. Its kind of old though

Also, may I suggest you change the title to "Please support ARM64 binary downloads" or something?

@CorruptComputer CorruptComputer changed the title docker-compose fails to run Please support ARM64 binary downloads May 20, 2020
@CorruptComputer
Copy link
Author

Changed the name, thanks! I had no idea it wasn't supported since there wasn't a note for compatibility on the documentation.

@el-vishal
Copy link

el-vishal commented May 23, 2020

Same issue, I am trying to install it on my Raspberry Pi - *3 - Raspbian OS

Edit 2: Managed to bypass it using https://github.com/AppTower/docker-compose

Got it from the discussion here: #6831 (comment)

@sshmaxime
Copy link

Hey guys, same issue here. If you want to make sure it's the same issue just run cat /usr/local/bin/docker-compose you must see "Not Found".

@CorruptComputer Did you solve this issue ?

@chenxushuo
Copy link

I installed docker-compose on centos7-arm64,
CMD

sudo yum install -y libffi libffi-devel openssl-devel python3 python3-pip python3-devel
sudo pip3 install docker-compose

If have some error,run it twice!

@justincormack
Copy link
Member

Hi, yes we currently recommend the pip install method for Arm64. I will see if we can get arm64 binaries built as well.

@vdo
Copy link

vdo commented Aug 5, 2020

Hi, yes we currently recommend the pip install method for Arm64. I will see if we can get arm64 binaries built as well.

This would be great, as it takes long time to build with the pip install on some boards. We are currently maintaining a fork to get such binaries in https://github.com/dappnode/compose/releases/tag/1.25.5

@CorruptComputer
Copy link
Author

@MaximeAubanel I did not, I ended up giving up on Docker and just installing the applications I was trying to run manually. Hopefully they support this someday, but for now its just not possible for me. Since one of the apps I use specifically says not to use the pip package for docker-compose, as it does not work.

@sshmaxime
Copy link

@CorruptComputer I made it works installing it with apt-get:

sudo apt-get install docker-compose

@rfay
Copy link
Contributor

rfay commented Oct 9, 2020

Note that apt-get install docker-compose may get a very, very old version of docker-compose. On all Ubuntu before 20.04 and all Debian even with Buster you get old versions. Debian Buster gets 1.21.0

The sudo pip3 install docker-compose technique works on Debian Buster arm64 (Raspberry Pi OS 64-bit).

The pip technique isn't mentioned in https://docs.docker.com/compose/install/#install-compose-on-linux-systems and only way below the fold on that page, discussing "pre-release" versions.

yob added a commit to buildkite/elastic-ci-stack-for-aws that referenced this issue Oct 27, 2020
Sadly, there's no binary distribution for linux+arm yet:
docker/compose#7472

This is an imperfect solution, but it gets us going for now.
yob added a commit to buildkite/elastic-ci-stack-for-aws that referenced this issue Oct 29, 2020
Sadly, there's no binary distribution for linux+arm yet:
docker/compose#7472

This is an imperfect solution, but it gets us going for now.
@fanlix
Copy link

fanlix commented Nov 13, 2020

This can be done by pip.
but offering an Arm-Release by official will be very helpful.

the pip version is a python script, with so many dependencies:

Installing collected packages: websocket-client, pycparser, cffi, bcrypt, pynacl, paramiko, docker, cached-property, distro, python-dotenv, PyYAML, texttable, attrs, pyrsistent, zipp, importlib-metadata, jsonschema, dockerpty, docopt, docker-compose
Successfully installed PyYAML-5.3.1 attrs-20.3.0 bcrypt-3.2.0 cached-property-1.5.2 cffi-1.14.3 distro-1.5.0 docker-4.3.1 docker-compose-1.27.4 dockerpty-0.4.1 docopt-0.6.2 importlib-metadata-2.0.0 jsonschema-3.2.0 paramiko-2.7.2 pycparser-2.20 pynacl-1.4.0 pyrsistent-0.17.3 python-dotenv-0.15.0 texttable-1.6.3 websocket-client-0.57.0 zipp-3.4.0

we can make this simple and clean.

yob added a commit to buildkite/elastic-ci-stack-for-aws that referenced this issue Nov 23, 2020
Sadly, there's no binary distribution for linux+arm yet:
docker/compose#7472

This is an imperfect solution, but it gets us going for now.
@alshdavid
Copy link

alshdavid commented Dec 23, 2020

I have tried the following commands to get docker-compose installed on Amazon's a1/c6g AMI instances using the Gravitron ARM

sudo yum update -y
sudo amazon-linux-extras install docker -y
sudo service docker start
sudo usermod -a -G docker ec2-user

sudo yum install \
  python3 python3-devel gcc gcc-c++ \
   libffi-devel openssl-devel -y

sudo pip3 install --upgrade setuptools pip

sudo /usr/local/bin/pip install --user docker-compose

# Now use with
sudo su
docker-compose

I'm not very good with permissions, so if someone can adjust these steps so they work without sudo or being root.

@pda
Copy link

pda commented Feb 8, 2021

This is even more important now that cryptography, a transitive dependency of docker-compose via paramiko, requires a rust toolchain to compile as of v3.4. It's becoming very difficult to install docker-compose onto arm64 machines.

pda added a commit to buildkite/elastic-ci-stack-for-aws that referenced this issue Feb 8, 2021
docker-compose depends on the cryptography package, v3.4 of which
introduces a build dependency on rust; let's avoid that for now.
https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst#34---2021-02-07

This should be unpinned ASAP; hopefully docker-compose will offer binary
download for arm64 at some point:
docker/compose#7472
pda added a commit to buildkite/elastic-ci-stack-for-aws that referenced this issue Feb 8, 2021
docker-compose depends on the cryptography package, v3.4 of which
introduces a build dependency on rust; let's avoid that for now.
https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst#34---2021-02-07

This should be unpinned ASAP; hopefully docker-compose will offer binary
download for arm64 at some point:
docker/compose#7472
@ajeetraina
Copy link

ajeetraina commented Feb 17, 2021

For anyone who want to get Docker Compose 1.28.2 up and running on ARM(Tested it on Jetson Nano), this might be useful:

#!/bin/bash
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install curl python3-pip libffi-dev python-openssl libssl-dev zlib1g-dev gcc g++ make -y
curl -sSL https://get.docker.com/ | sh
sudo snap install rustup --classic
sudo apt install rustc
sudo pip3 install docker-compose
sudo docker-compose --version
sudo docker-compose version
docker-compose version 1.28.2, build unknown
docker-py version: 4.4.2
CPython version: 3.6.9
OpenSSL version: OpenSSL 1.1.1  11 Sep 2018

Enjoy!

@Rar9
Copy link

Rar9 commented Mar 14, 2021

@ajeetraina thanks for this

All seams ok in a vim3 with ubuntu 20.04

Only the sudo snap install rustup --classic line didnt work for me.
Anything to wory about as this is not really recommended https://snapcraft.io/install/rustup/ubuntu

@ulyssessouza ulyssessouza self-assigned this Apr 20, 2021
@ulyssessouza
Copy link
Collaborator

This issue is meant to be solved by compose version 2 which is the Golang implementation available in https://github.com/docker/compose-cli for now.
In the release page you will find various ARM binaries.

@rfay
Copy link
Contributor

rfay commented Apr 20, 2021

I'm glad that compose-cli is going to mature and have a new golang implementation... but it's not going to be a safe drop-in replacement for docker-compose some time right? So ... We'd love to have arm binaries here. Not hard I don't think.

@ulyssessouza
Copy link
Collaborator

The problem of having docker-compose binaries is that pyinstaller doesn't support that for now.

About compose-cli (AKA v2), the idea is definitely to have it as a drop-in. Early adopters would help a lot in this process.
The more we have a people using the more we can identify differences and work on it to evolve.

For now, we are maintaining a documentation page with the compatibility matrix. At least in the UX https://docs.docker.com/compose/cli-command-compatibility/

@rfay
Copy link
Contributor

rfay commented Apr 22, 2021

Unfortunately it will be a couple of years before ddev can easily start using docker compose over docker-compose since it's spread out across so many different platforms with different availability of docker versions, etc.

@ndeloof
Copy link
Contributor

ndeloof commented Jun 17, 2021

we also provide a translation tool so that scripts/tools relying on docker-compose will be able to transparently use docker compose - and ddev has been tested for this

@ndeloof ndeloof closed this as completed Jun 17, 2021
@rfay
Copy link
Contributor

rfay commented Jun 17, 2021

Thanks @ndeloof - could you say more about "translation tool", maybe a link? I understand that docker-compose is being retired, but I'm not understanding what you're saying.

As noted above, I've had success with sudo pip3 install docker-compose on arm64 platforms as well.

@vdo
Copy link

vdo commented Jun 17, 2021

whether pip based installations work or not, I think it would be highly convenient to have an ARM(64) binary, non dependent on all the python packages. That's what this issue was all about!

@ndeloof
Copy link
Contributor

ndeloof commented Jun 17, 2021

@rfay this is not public yet, but bundled in latest Docker Desktop - we will make this open-source soon
We made a tiny wrapper tool to translate a docker-compose ... command into docker compose ... including re-ordering flags as required. This allows to adopt Compose v2 without impact on existing tools/script relying on docker-compose.

@vdo Compose v2 is a Go project, so we can build static ARM binaries without any runtime dependencies

@vdo
Copy link

vdo commented Jun 17, 2021

@vdo Compose v2 is a Go project, so we can build static ARM binaries without any runtime dependencies

Nice, I missed that part. I will give it a try.

@TimHeckel
Copy link

@alshdavid

I'm not very good with permissions, so if someone can adjust these steps so they work without sudo or being root.

I was able run the last command without sudo: /usr/local/bin/pip install --user docker-compose

And it put docker-compose inside /home/ec2-user/.local/bin

When I restarted my ssh, docker-compose works for ec2-user without sudo.

@enthusiasticgeek
Copy link

enthusiasticgeek commented Jul 19, 2021

My set of commands to upgrade from version 1.17 to version 1.29.2 (latest at this time) are as follows. (modified from @ajeetraina's commands above)

sudo service docker stop
sudo apt remove docker-compose -y
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install curl python3-pip libffi-dev python-openssl libssl-dev zlib1g-dev gcc g++ make -y
sudo snap install rustup --classic
sudo apt install rustc
sudo pip3 install setuptools_rust
sudo pip3 install docker-compose
sudo docker-compose --version
sudo service docker start

@mrwormhole
Copy link

@sshmaxime I can confirm this issue still exists and no warning on the docker-compose page whatsoever. arm64 users should be warned on this page https://docs.docker.com/compose/install/

Thank you tho, it helped me without pip3/pip which is a horrible package manager by far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests