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

Fix Docker builds on Raspberry Pi #1169

Merged
merged 2 commits into from
Feb 22, 2021
Merged

Conversation

rjanja
Copy link
Contributor

@rjanja rjanja commented Feb 20, 2021

Summary

Docker build on Raspberry Pi is failing on Alpine 3.13:

Step 7/11 : RUN apk add tzdata
 ---> Running in ec28ac240ffc
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/armv7/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: No such file or directory
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/armv7/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/community: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: No such file or directory
ERROR: unable to select packages:
  tzdata (no such package):
    required by: world[tzdata]
The command '/bin/sh -c apk add tzdata' returned a non-zero code: 1

While I thought it was related to network settings or container permissions, it turned out to be an effect of alpinelinux/docker-alpine#135.

From the Alpine 3.13 release notes:

Alpine Linux 3.13.0 requires the host Docker to be version 19.03.9 (which contains backported moby commit 89fabf0) or greater and the host libseccomp to be version 2.4.2 (which contains backported libseccomp commit bf747eb) or greater

On Raspbian buster, libseccomp is at 2.3.3-4. I'm not sure if there are prebuilt packages available for >=2.4.2 but that would be another option for resolving this.

Approach

This PR adds a build argument for image name and defaults it to what it was, and updates docs for Raspberry Pi docker build to use a currently-working Alpine version.

Feedback

  • Should image name argument include the entire image name, not just something under the python namespace?

P.S. thank you for your work on this! I have not even had a chance to run it yet but am excited to try it! 🎉

- Update docs with a working Raspberry Pi docker build command
- See also alpine-linux/docker-alpine#135
@rjanja rjanja changed the title Allow passing docker image in as build arg Fix Docker builds on Raspberry Pi Feb 20, 2021
@Odianosen25
Copy link
Collaborator

Thanks for this @rjanja, if we are going to do this, then allow for the whole image to improve on flexibility.

Regards

@rjanja
Copy link
Contributor Author

rjanja commented Feb 21, 2021

Thanks for this @rjanja, if we are going to do this, then allow for the whole image to improve on flexibility.

Thanks for the quick review! I've updated the PR to allow the entire image name to be specified.

@Odianosen25 Odianosen25 merged commit bd93bc1 into AppDaemon:dev Feb 22, 2021
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.

3 participants