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

Make build process ARM compatible #5

Closed
tlwt opened this issue Dec 10, 2019 · 7 comments
Closed

Make build process ARM compatible #5

tlwt opened this issue Dec 10, 2019 · 7 comments
Assignees

Comments

@tlwt
Copy link
Contributor

tlwt commented Dec 10, 2019

We just tried to run the image on i.MX6 and got the following error message:

standard_init_linux.go:190: exec user process caused "exec format error"

This seems to be related to the build process and ARM infrastructure (see tiangolo/uwsgi-nginx-flask-docker#67). This needs to be investigated and a plan derived how to make the build process compatible.

@SoberHellman
Copy link
Contributor

Just tried out the new "buildx" command by docker: https://github.com/docker/buildx
It is an easy way to create an image for multiple platforms. I don't know how easy it is to integrate it into drone.

@SoberHellman
Copy link
Contributor

I looked a little bit further. buildx might not be needed. Docker build now supports the --platform "linux/arm/v7" command. This requires that you system is able to build for linux arm.
I have no experience with drone. But the following docker build command works:
DOCKER_BUILDKIT=1 docker build --platform "linux/arm/v7" -t "tag" .

@tlwt
Copy link
Contributor Author

tlwt commented Mar 18, 2020

@tlwt
Copy link
Contributor Author

tlwt commented Mar 18, 2020

@SoberHellman - could you make this happen? @ctrl-shift-esc can you check on i.MX if it runs?

@SoberHellman
Copy link
Contributor

did some research for drone. Maybe its even easier: https://docs.drone.io/pipeline/docker/syntax/platform/

@SoberHellman SoberHellman linked a pull request Mar 19, 2020 that will close this issue
@tlwt
Copy link
Contributor Author

tlwt commented Mar 19, 2020

I think that trick is only to select the platform during execution of the DevOps pipeline, but not for the target image.

@SoberHellman
Copy link
Contributor

Thats true, but it also defines the target os and architecture: "Use the platform section to configure the target operating system and architecture and routes the pipeline to the appropriate runner. If unspecified, the system defaults to Linux amd64."

@tlwt tlwt closed this as completed in a04b2e2 Mar 20, 2020
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 a pull request may close this issue.

3 participants