Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker version on azure/github actions #429

Closed
tlambert03 opened this issue Jun 20, 2020 · 4 comments
Closed

Docker version on azure/github actions #429

tlambert03 opened this issue Jun 20, 2020 · 4 comments
Labels
bug A crash or error in behavior.

Comments

@tlambert03
Copy link
Contributor

Please forgive what is not exactly a direct briefcase question...

I recently ran into the new docker check introduced in 0.3.1 while building on github actions, ubuntu-16.0.4, which errored in:

Briefcase requires Docker 19 or higher, but you are currently running
version 3.0.13+azure, build dd360c7c0de8d9132a3965db6a59d3ae74f43ba7.

I don't really know enough about docker on azure to know whether this is just exposing that the simple if int(version[0]) < 19: check is insufficient for certain cases with CI, or if they really are running an ancient docker version on github actions (and my googling was unsuccessful).

I'm aware that I can use --no-dockerto go back to the old behavior ... but I'd also like to understand this a bit to know whether I could eventually take advantage of the new AppImage build approach on linux.

@paulproteus
Copy link
Contributor

Hi @tlambert03 ! I don't know either, but I saw this question of yours, and it made me start searching for docs... and I really have no idea what this Docker 3.0.13+azure version is. :) Can you get some more info, like run docker --help?

I also don't know why the Docker version number requirement is exactly in there.

I know we've had great success with Docker in GitHub Actions for https://github.com/beeware/Python-Android-support , for whatever that's worth. See e.g. these happy build logs, https://github.com/beeware/Python-Android-support/actions/runs/128273404

@freakboy3742
Copy link
Member

For the record: The docker version requirement is there because Docker 18 has some broken behavior in dealing with permissions of files on mounted volumes, which we need to be

Digging into the problem, it looks like docker 3.0.13+azure is "docker-moby", which is what is being used on Github Actions 18.04 virtual environments. I'm not 100% sure what the differences are - it might be a an implementation detail of Github Actions (because running containers in containers is complex), or it could be a licensing problem (Moby is the open source wing of the Docker company). Either way, it's a different version number :-)

So: There's two solutions here - a fix for Briefcase, and an immediate workaround (that is arguably a better fix in this case anyway).

The fix is to modify the version check to allow for docker-moby. If you're able to work out what docker --version returns, we can modify the "allowed Docker versions" pattern to accomodate - hopefully there is something advertising itself as "docker-moby", not just Docker. At this point, we're not aware of any issues with docker-moby, so "allow all docker-moby versions, allow pure-Docker >= 19" should be fine.

The local workaround is to use the --no-docker when building your Linux AppImages, and build on GitHub Actions ubuntu-16.04 build host. We're only using Docker because we need to guarantee we're using Ubuntu 16.04; but if CI can provide that guarantee for you, you might as well used it. The added bonus is that it should result in faster builds, because you don't have to go through the process of building Docker images.

@freakboy3742 freakboy3742 added bug A crash or error in behavior. up-for-grabs labels Jun 21, 2020
@tlambert03
Copy link
Contributor Author

Thanks a lot! Yes I can build just fine with the no-docker, flag... and if you feel like that’s just as good provided I can be on 16.04, I’ll stick with that for now.

But I will also try to get a little more info about the docker-moby version there in case it’s helpful.

@freakboy3742
Copy link
Member

Closing since this doesn't seem to be an issue any more; We're running docker-based builds on GitHub Actions without any problems.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

3 participants