対象環境
- Raspberry pi 3 Model B+
- Raspbian stretch 2018-06-27
2018-09-14時点。
参考
https://qiita.com/katsusuke/items/beec05e1afcd67ebd3dc
手順
$ cd /tmp
$ git clone https://github.com/docker/compose.git
Cloning into 'compose'... remote: Counting objects: 27109, done. remote: Compressing objects: 100% (26/26), done. remote: Total 27109 (delta 8), reused 16 (delta 6), pack-reused 27076 Receiving objects: 100% (27109/27109), 10.53 MiB | 648.00 KiB/s, done. Resolving deltas: 100% (18590/18590), done.
$ cd compose $ cp -i Dockerfile Dockerfile.armhf cp: 'Dockerfile.armhf' を上書きしますか? y $ sed -i -e 's/^FROM debian\:/FROM armhf\/debian:/' Dockerfile.armhf $ sed -i -e 's/x86_64/armel/g' Dockerfile.armhf
$ docker build -t docker-compose:armhf -f Dockerfile.armhf . $ docker run --rm --entrypoint="script/build/linux-entrypoint" -v $(pwd)/dist:/code/dist -v $(pwd)/.git:/code/.git "docker-compose:armhf"
docker build
で失敗した。
$ docker build -t docker-compose:armhf -f Dockerfile.armhf . Sending build context to Docker daemon 1.762MB Step 1/18 : FROM python:3.6 3.6: Pulling from library/python b0e52c109d40: Pull complete 215164aeca71: Pull complete 3881d6781569: Pull complete 247050a50170: Pull complete 9616fd9b504f: Pull complete 14a57859feb8: Pull complete 8400c9adfc97: Pull complete 14cbbc3d0564: Pull complete e149f68f7190: Pull complete Digest: sha256:0c3b6384565b8524a82096bee143174a1f07a28cfdc090ca63c040251ab10604 Status: Downloaded newer image for python:3.6 ---> 4af1ba713e0d Step 2/18 : RUN set -ex; apt-get update -qq; apt-get install -y locales curl python-dev git ---> Running in 888dba619419 + apt-get update -qq + apt-get install -y locales curl python-dev git Reading package lists... Building dependency tree... Reading state information... git is already the newest version (1:2.11.0-3+deb9u3). The following additional packages will be installed: libc-l10n libcurl3 libcurl4-openssl-dev libpython-dev libpython2.7 libpython2.7-dev python2.7-dev Suggested packages: libcurl4-doc libcurl3-dbg libidn11-dev libldap2-dev librtmp-dev libssh2-1-dev libssl1.0-dev | libssl-dev The following NEW packages will be installed: libc-l10n libpython-dev libpython2.7 libpython2.7-dev locales python-dev python2.7-dev The following packages will be upgraded: curl libcurl3 libcurl4-openssl-dev 3 upgraded, 7 newly installed, 0 to remove and 1 not upgraded. Need to get 33.9 MB of archives. After this operation, 52.2 MB of additional disk space will be used. Get:1 http://deb.debian.org/debian stretch/main armhf libc-l10n all 2.24-11+deb9u3 [820 kB] Get:2 http://security.debian.org/debian-security stretch/updates/main armhf libcurl4-openssl-dev armhf 7.52.1-5+deb9u7 [350 kB] Get:3 http://security.debian.org/debian-security stretch/updates/main armhf curl armhf 7.52.1-5+deb9u7 [224 kB] Get:4 http://deb.debian.org/debian stretch/main armhf locales all 2.24-11+deb9u3 [3287 kB] Get:5 http://security.debian.org/debian-security stretch/updates/main armhf libcurl3 armhf 7.52.1-5+deb9u7 [264 kB] Get:6 http://deb.debian.org/debian stretch/main armhf libpython2.7 armhf 2.7.13-2+deb9u2 [940 kB] Get:7 http://deb.debian.org/debian stretch/main armhf libpython2.7-dev armhf 2.7.13-2+deb9u2 [27.7 MB] Get:8 http://deb.debian.org/debian stretch/main armhf libpython-dev armhf 2.7.13-2 [20.0 kB] Get:9 http://deb.debian.org/debian stretch/main armhf python2.7-dev armhf 2.7.13-2+deb9u2 [289 kB] Get:10 http://deb.debian.org/debian stretch/main armhf python-dev armhf 2.7.13-2 [1130 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 33.9 MB in 26s (1265 kB/s) Selecting previously unselected package libc-l10n. (Reading database ... 29970 files and directories currently installed.) Preparing to unpack .../0-libc-l10n_2.24-11+deb9u3_all.deb ... Unpacking libc-l10n (2.24-11+deb9u3) ... Selecting previously unselected package locales. Preparing to unpack .../1-locales_2.24-11+deb9u3_all.deb ... Unpacking locales (2.24-11+deb9u3) ... Preparing to unpack .../2-libcurl4-openssl-dev_7.52.1-5+deb9u7_armhf.deb ... Unpacking libcurl4-openssl-dev:armhf (7.52.1-5+deb9u7) over (7.52.1-5+deb9u6) ... Preparing to unpack .../3-curl_7.52.1-5+deb9u7_armhf.deb ... Unpacking curl (7.52.1-5+deb9u7) over (7.52.1-5+deb9u6) ... Preparing to unpack .../4-libcurl3_7.52.1-5+deb9u7_armhf.deb ... Unpacking libcurl3:armhf (7.52.1-5+deb9u7) over (7.52.1-5+deb9u6) ... Selecting previously unselected package libpython2.7:armhf. Preparing to unpack .../5-libpython2.7_2.7.13-2+deb9u2_armhf.deb ... Unpacking libpython2.7:armhf (2.7.13-2+deb9u2) ... Selecting previously unselected package libpython2.7-dev:armhf. Preparing to unpack .../6-libpython2.7-dev_2.7.13-2+deb9u2_armhf.deb ... Unpacking libpython2.7-dev:armhf (2.7.13-2+deb9u2) ... Selecting previously unselected package libpython-dev:armhf. Preparing to unpack .../7-libpython-dev_2.7.13-2_armhf.deb ... Unpacking libpython-dev:armhf (2.7.13-2) ... Selecting previously unselected package python2.7-dev. Preparing to unpack .../8-python2.7-dev_2.7.13-2+deb9u2_armhf.deb ... Unpacking python2.7-dev (2.7.13-2+deb9u2) ... Selecting previously unselected package python-dev. Preparing to unpack .../9-python-dev_2.7.13-2_armhf.deb ... Unpacking python-dev (2.7.13-2) ... Setting up libcurl3:armhf (7.52.1-5+deb9u7) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Setting up libc-l10n (2.24-11+deb9u3) ... Setting up libpython2.7:armhf (2.7.13-2+deb9u2) ... Setting up libpython2.7-dev:armhf (2.7.13-2+deb9u2) ... Setting up python2.7-dev (2.7.13-2+deb9u2) ... Setting up locales (2.24-11+deb9u3) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline Generating locales (this might take a while)... Generation complete. Setting up libcurl4-openssl-dev:armhf (7.52.1-5+deb9u7) ... Setting up libpython-dev:armhf (2.7.13-2) ... Setting up curl (7.52.1-5+deb9u7) ... Setting up python-dev (2.7.13-2) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Removing intermediate container 888dba619419 ---> db70b47488e3 Step 3/18 : RUN curl -fsSL -o dockerbins.tgz "https://download.docker.com/linux/static/stable/armel/docker-17.12.0-ce.tgz" && SHA256=692e1c72937f6214b1038def84463018d8e320c8eaf8530546c84c2f8f9c767d; echo "${SHA256} dockerbins.tgz" | sha256sum -c - && tar xvf dockerbins.tgz docker/docker --strip-components 1 && mv docker /usr/local/bin/docker && chmod +x /usr/local/bin/docker && rm dockerbins.tgz ---> Running in a621dd92f840 dockerbins.tgz: FAILED sha256sum: WARNING: 1 computed checksum did NOT match The command '/bin/sh -c curl -fsSL -o dockerbins.tgz "https://download.docker.com/linux/static/stable/armel/docker-17.12.0-ce.tgz" && SHA256=692e1c72937f6214b1038def84463018d8e320c8eaf8530546c84c2f8f9c767d; echo "${SHA256} dockerbins.tgz" | sha256sum -c - && tar xvf dockerbins.tgz docker/docker --strip-components 1 && mv docker /usr/local/bin/docker && chmod +x /usr/local/bin/docker && rm dockerbins.tgz' returned a non-zero code: 1
エラー箇所は以下。データ破損している?
dockerbins.tgz: FAILED sha256sum: WARNING: 1 computed checksum did NOT match
再度、同コマンドを実行しても同じ。
もういいや。諦めよう。
追記
docker + gitea
DockerでGiteaを動かしてみた をやってみたかった……。残念。
makefile
$ sudo make install Makefile:8: *** 複数のターゲットパターンです. 中止. $ sudo make install -f /tmp/compose/Makefile /tmp/compose/Makefile:8: *** 複数のターゲットパターンです. 中止.
Makefile
ファイルは作成したもの以外どこにもなかったのに……。謎。