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

WIP (do not merge): GH actions multiarch #44

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ndeet
Copy link

@ndeet ndeet commented Nov 20, 2019

Based on your comment in #43 I tried it with GH actions and the excelent boilerplate.

To make it work you need to create access token on DockerHub and add it as secret DOCKER_TOKEN

What works:
The GH workflow runs and seems to do the 3 arch builds, uploads them to docker and makes release on GH.
As secrets do not work on forked repos I needed to push to new repo to try workflows, you can see it here:
https://github.com/ndeet/docker-electrumx-workflow/actions
and on DockerHub:
https://hub.docker.com/repository/docker/ndeet/electrumx-workflow/tags?page=1

Open issues/todo:
I tried to replace your image with mine on BTCPayServer and assumed it will fetch the arm64v8 arch but it is still a amd64 arch it seems. Also when you look at master tags arch still says amd64 and on the tagged release it has weird slashes in the arch. Will debug that further.

@lukechilds
Copy link
Owner

Wow, great work @ndeet!

@meeDamian any pointers on the arch issue? Have you came across this issue before with the box?

@meeDamian
Copy link

I started looking into it, and found a bunch of really weird things, ex. docker hub digests don't match ones I end up pulling - could you guys verify that too?

I'll look into it shortly, but now gotta run catch a train!

CPU="arm64v8"
fi
sed -i Dockerfile \
-e "s|^FROM alpine|FROM $CPU/alpine|g"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line does nothing, and this line is essential to getting it to work. You use a different base for your image, and it doesn't match sed's pattern.

Copy link
Author

@ndeet ndeet Nov 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, thank you, very good catch, now as you mention it makes totally sense, so the docker file for each stays with the same alpine arch (amd64) like the original Dockerfile and therefore we built always the same arch (and it doeas also not fail because it is a valid arch) 🤦‍♂

I will check how those python specific arches are named and play with that regex to make it work, thank you!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite sure it's: {arm32v6,arm32v7,arm64v8,amd64}/python:3.7-alpine3.9

Copy link
Author

@ndeet ndeet Nov 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes found that out and adjusted regex to replace everything after FROM and prepend $CPU/ and it works for the arch. "s|^FROM \(.*\)|FROM $CPU/\1|g"

However, new problem, rocksdb-dev (leveldb-dev works though) is not available for arm arches on alpinelinux it seems, so it fails there now:
https://github.com/ndeet/docker-electrumx-workflow/runs/322018407#step:6:99

https://pkgs.alpinelinux.org/packages?name=rocksdb-dev&branch=edge

Next step, figure out how to build multi arch packages for Alpinelinux? 😬 https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package

I tried also install rocksdb-dev via pip3 on rpi4 on Debian Buster, while it finds the package it errors on building it, but OT here, just wanted to check if it is generally available elsewhere.

 rocksdb/_rocksdb.cpp:622:10: fatal error: rocksdb/slice.h: No such file or directory
     #include "rocksdb/slice.h"
              ^~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

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

Successfully merging this pull request may close these issues.

None yet

4 participants