Skip to content

Multi arch build storage and dockerfile refinement #1

@JeffreyFreeland

Description

@JeffreyFreeland

The intended deployment environment is a raspberry pi 4. Running docker build on local machine results in a build arch of linux/amd64, but the raspberry pi appears to need a build arch of linux/arm/v7. Luckily this was solved by installing some extra stuff in the Dockerfile and running docker buildx build --platform linux/arm/v7 -t arm-build .

However, need to do some investigation into issues around this, which I can either do at one time or just use what's written now and split up later:

  1. On the python image on docker hub, it appears as though the registry can have multiple arch types under the same tag, allowing the using platform to pull the correct one. When I tried to push with the same tag, it overwrote. How can I get multiple arch under the same tag? These mentions of manifests may be helpful:
  1. Building for armv7 reintroduced issues with dependencies being installed during the pip install, making me swap back to alpine with the extra installation of gcc and mysl-dev to get an image that successfully built for both architectures. This probably increases the size, which ideally I'd like to have be small due to deployment platform. The comments on these issues give suggestions for getting the image size smaller for what appears to be a similar situation (at the very least I can take gcc back out?):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions