go4droid
go4droid copied to clipboard
Dockerfile: include pkg-config for Go builds that need C libs
for example: https://github.com/keroserene/go-webrtc
Here's the build log: https://gitlab.com/eighthave/snowflake/-/jobs/111223574
at first glance it LGTM, but I'll have another look later, thanks.
@eighthave I don't understand the build log you pasted above. You seem to be pulling the go4droid image, but you don't seem to be using it to build an android project with gradlew, are you? So I don't see what's preventing you from installing pkg-config outside of the go4droid image. I'm not familiar with gitlab, can you please point me to the configuration/build/Dockerfile file responsible for the build you linked to, so I can get a better idea?
I'm using it only to build a Go CLI tool for Android right now. Gitlab CI is just a straight docker runner. Look at the "test-template" job to see what it is doing: https://gitlab.com/eighthave/snowflake/blob/master/.gitlab-ci.yml
What gitlab-ci does is check out snowflake.git then runs the commands in the docker image you specify. This is all run on their servers, not on my machine.
Sorry, I'd like to re-familiarize myself with android building before answering that. And while I'm at it I'll probably update all the deps in this image if possible, and depending on what the latest from golang.org/x/mobile wants/needs. I'll need a bit of time.
@eighthave hey. I don't really see why pkg-config needs to be added to mpl7/go4droid, and not just installed after, on top of it. Can you show me (with a Dockerfile, or whatever else) how you would like to use the image please?
since the Dockerfile sets the User, it is not possible during runtime to install pkg-config. There is no possibility to use sudo. In an normal gitlab-ci run, it is possible to run things as root without a password.
@eighthave I see. Would that help as an alternative then: https://github.com/mpl/go4droid/pull/5 ?