-
-
Notifications
You must be signed in to change notification settings - Fork 480
Refactor Dockerfile for multi-architecture support #5772
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
base: main
Are you sure you want to change the base?
Conversation
|
Surge PR preview deployment succeeded. View it at https://woodpecker-ci-woodpecker-pr-5772.surge.sh |
| make build-cli | ||
|
|
||
| ### build the image | ||
| docker buildx build --platform linux/amd64 -t username/repo:tag -f docker/Dockerfile.cli.multiarch.rootless --push . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well if we have agent/server also use vars why not here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, I will look into that for the next part.
docker/Dockerfile.server.multiarch
Outdated
| # -------------- Build backend -------------- | ||
| FROM --platform=$BUILDPLATFORM docker.io/golang:1.25 AS build | ||
|
|
||
| # Install cross-compilation toolchains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant we reuse xgo as we else would have to maintain this ourselfes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
|
also if we have https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/docker.yaml |
…abled to targets (scratch and alpine) from the containerfile
aea478c to
7831902
Compare
I moved the PR to draft, i redid the dockerfile, now it can build with two targets both scratch and alpine using I will look into adding it to the pipeline when i have the time :) |
Enhance the Dockerfile to support multi-architecture builds, eliminating the need for local compilation dependencies. This change streamlines the build process for various platforms.
I made this to make it simpler to release the images, and keep all the work of compiling the images within the dockerfile.