×

生成 arm架构的docker compose

Falcon 2020-01-30 views:
自动摘要

正在生成中……

I had built it on my Raspberry Pi 3 Model B Rev 1.2 with Raspbian10 (buster) [arm/v7].
You can try to do it on your Raspberry Pi 4.

pi@raspberrypi:~ $ git clone https://github.com/docker/compose.git
pi@raspberrypi:~ $ cd compose/
pi@raspberrypi:~/compose $ git checkout -f 1.25.0
pi@raspberrypi:~/compose $ sudo docker build -t dockercompose:1.25.0 .
pi@raspberrypi:~ $ sudo curl -L --fail https://github.com/docker/compose/releases/download/1.25.0/run.sh -o /usr/local/bin/docker-compose
pi@raspberrypi:~ $ sudo chmod +x /usr/local/bin/docker-compose
pi@raspberrypi:~ $ sudo sed -i 's/docker\/compose:$VERSION"/dockercompose:$VERSION"/g' /usr/local/bin/docker-compose
pi@raspberrypi:~ $ sudo docker-compose version
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019

I have the following images after docker build.

pi@raspberrypi:~ $ sudo docker images
REPOSITORY          TAG                     IMAGE ID            CREATED              SIZE
dockercompose       1.25.0                  9272a0512c9e        16 seconds ago       56.6MB
<none>              <none>                  d4b17be57ec2        About a minute ago   470MB
<none>              <none>                  a164b2c19a32        31 minutes ago       306MB
python              3.7.4-slim-stretch      c8a29540aa80        2 months ago         112MB
python              3.7.4-alpine3.10        6fcdf3f2e43b        2 months ago         76.6MB
debian              stretch-20190812-slim   9e643d1c5544        4 months ago         41.5MB
docker              18.09.7                 1661b80f3a8a        5 months ago         140MB
alpine              3.10.1                  962e8b19ad7b        5 months ago         3.74MB

The executable docker-compose binary file is inside dockercompose:1.25.0alpine:3.10.1 is the base image of dockercompose:1.25.0. The other images are useless anymore. You can delete them.

And don't try to copy it to Raspberry Pi and use it directly. Because it depends on other shared library inside dockercompose:1.25.0.

It takes 40mins to build it on my Raspberry Pi 3. I had uploaded it to my docker-hub. If anyone want to use it on Raspberry Pi 3(arm/v7), please refer here.