ModischFabrications / CutSolver

Webservice to determine ideal cut placement on stocks
https://cutsolver.modisch.me
GNU Lesser General Public License v3.0
31 stars 6 forks source link

Fix multiarch build #16

Closed ModischFabrications closed 4 years ago

ModischFabrications commented 5 years ago

Docker hub builds until the timeout hits while arm64 is done after 2min (according to Logs). Builds can't be cancelled manually.

No errors are shown, seems like other architectures are being ignored even though qemu seems to register successful.

Try installing qemu before building the image instead. Post to https://github.com/docker/hub-feedback/issues/1261 if no other solution was found.

$ sudo apt update
$ sudo install qemu qemu-user-static qemu-user binfmt-support

Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
Executing post_checkout hook...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 619 0 619 0 0 605 0 --:--:-- 0:00:01 --:--:-- 605
0 1678k 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0qemu-3.0.0+resin-arm/
qemu-3.0.0+resin-arm/qemu-arm-static
100 1678k 100 1678k 0 0 1081k 0 0:00:01 0:00:01 --:--:-- 7770k
Pulling cache layers for index.docker.io/modischfabrications/cutsolver:latest...
Done!
Executing pre_build hook...
Unable to find image 'multiarch/qemu-user-static:register' locally
register: Pulling from multiarch/qemu-user-static
fc1a6b909f82: Pulling fs layer
ed0d08c6c573: Pulling fs layer
96aa3d7b9b30: Pulling fs layer
8d669bf48302: Pulling fs layer
8d669bf48302: Waiting
ed0d08c6c573: Verifying Checksum
ed0d08c6c573: Download complete
96aa3d7b9b30: Verifying Checksum
96aa3d7b9b30: Download complete
8d669bf48302: Verifying Checksum
8d669bf48302: Download complete
fc1a6b909f82: Verifying Checksum
fc1a6b909f82: Download complete
fc1a6b909f82: Pull complete
ed0d08c6c573: Pull complete
96aa3d7b9b30: Pull complete
8d669bf48302: Pull complete
Digest: sha256:e972d7cd2aa56ed083dc74d7f0cb708e0a9d041aa64e50462785338b29bceeca
Status: Downloaded newer image for multiarch/qemu-user-static:register
Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha
Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm
Setting /usr/bin/qemu-armeb-static as binfmt interpreter for armeb
Setting /usr/bin/qemu-sparc32plus-static as binfmt interpreter for sparc32plus
Setting /usr/bin/qemu-ppc-static as binfmt interpreter for ppc
Setting /usr/bin/qemu-ppc64-static as binfmt interpreter for ppc64
Setting /usr/bin/qemu-ppc64le-static as binfmt interpreter for ppc64le
Setting /usr/bin/qemu-m68k-static as binfmt interpreter for m68k
Setting /usr/bin/qemu-mips-static as binfmt interpreter for mips
Setting /usr/bin/qemu-mipsel-static as binfmt interpreter for mipsel
Setting /usr/bin/qemu-mipsn32-static as binfmt interpreter for mipsn32
Setting /usr/bin/qemu-mipsn32el-static as binfmt interpreter for mipsn32el
Setting /usr/bin/qemu-mips64-static as binfmt interpreter for mips64
Setting /usr/bin/qemu-mips64el-static as binfmt interpreter for mips64el
Setting /usr/bin/qemu-sh4-static as binfmt interpreter for sh4
Setting /usr/bin/qemu-sh4eb-static as binfmt interpreter for sh4eb
Setting /usr/bin/qemu-s390x-static as binfmt interpreter for s390x
Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64
Setting /usr/bin/qemu-aarch64_be-static as binfmt interpreter for aarch64_be
Setting /usr/bin/qemu-hppa-static as binfmt interpreter for hppa
Setting /usr/bin/qemu-riscv32-static as binfmt interpreter for riscv32
Setting /usr/bin/qemu-riscv64-static as binfmt interpreter for riscv64
Setting /usr/bin/qemu-xtensa-static as binfmt interpreter for xtensa
Setting /usr/bin/qemu-xtensaeb-static as binfmt interpreter for xtensaeb
Setting /usr/bin/qemu-microblaze-static as binfmt interpreter for microblaze
Setting /usr/bin/qemu-microblazeel-static as binfmt interpreter for microblazeel
Setting /usr/bin/qemu-or1k-static as binfmt interpreter for or1k
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'18.03.1-ee-3', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2018-08-30T18:42:30.000000000+00:00', u'ApiVersion': u'1.37', u'MinAPIVersion': u'1.12', u'GitCommit': u'b9a5c95', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.10.2'}}]
Arch: amd64
BuildTime: 2018-08-30T18:42:30.000000000+00:00
ApiVersion: 1.37
Platform: {u'Name': u''}
Version: 18.03.1-ee-3
MinAPIVersion: 1.12
GitCommit: b9a5c95
Os: linux
GoVersion: go1.10.2
Starting build of index.docker.io/modischfabrications/cutsolver:latest...
Step 1/7 : FROM python:3.7
---> a4cc999cf2aa
Step 2/7 : EXPOSE 80
---> Using cache
---> 62a54b98454e
Step 3/7 : COPY ./requirements.txt requirements.txt
---> Using cache
---> 82eaf342eb1e
Step 4/7 : RUN pip install -r requirements.txt
---> Using cache
---> bae301531cc6
Step 5/7 : COPY ./app /app
---> Using cache
---> b23abeae1990
Step 6/7 : WORKDIR /app
---> Using cache
---> 60309b3c52ab
Step 7/7 : CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
---> Using cache
---> 21fdc721f83e
Successfully built 21fdc721f83e
Successfully tagged modischfabrications/cutsolver:latest
Pushing index.docker.io/modischfabrications/cutsolver:latest...
Done!
Build finished``
ModischFabrications commented 5 years ago

also consider https://github.com/docker/hub-feedback/issues/1352

ModischFabrications commented 5 years ago

container was build a few more times but still has no tag showing other architectures. Did not work as expected, log shows the classical exec format error.

ModischFabrications commented 5 years ago

https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/

ModischFabrications commented 5 years ago

https://docs.travis-ci.com/user/docker/#pushing-a-docker-image-to-a-registry

ModischFabrications commented 5 years ago

https://github.com/moby/moby/issues/36552

ModischFabrications commented 5 years ago

https://lobradov.github.io/Building-docker-multiarch-images/

ModischFabrications commented 5 years ago

https://github.com/Taisun-Docker/updater/blob/master/.travis.yml

ModischFabrications commented 4 years ago

clone structure of https://github.com/ModischFabrications/wahlzeit/blob/master/.travis.yml

-> push only with tag, set hub tags equal instead of always using latest

ModischFabrications commented 4 years ago

Maaaaaan, everything should have been so much easier with buildx or native multiplatform Docker Hub builds. It's still not released and every other solution does not work, is painful, or both.

ModischFabrications commented 4 years ago

getting closer, but this time a timeout happened after 57 min. Yes, it really took that long, I'm removing some archs now

https://travis-ci.org/github/ModischFabrications/CutSolver/jobs/676748087

ModischFabrications commented 4 years ago

follow up on https://github.com/travis-ci/travis-ci/issues/8740, still won't work right now.

ModischFabrications commented 4 years ago

test docker image health? -> waiting for 5m is bad, check it manually with curl.