Skip to content

Conversation

@MartinSchmidt
Copy link
Contributor

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.

@qwerty287 qwerty287 added the build CI pipeline related label Nov 21, 2025
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Nov 21, 2025

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 .
Copy link
Member

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?

Copy link
Contributor Author

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.

# -------------- Build backend --------------
FROM --platform=$BUILDPLATFORM docker.io/golang:1.25 AS build

# Install cross-compilation toolchains
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

@6543
Copy link
Member

6543 commented Dec 1, 2025

also if we have docker/Dockerfile.server.multiarch we should use it at our own build chain:

https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/docker.yaml

…abled to targets (scratch and alpine) from the containerfile
@MartinSchmidt MartinSchmidt marked this pull request as draft December 3, 2025 10:25
@MartinSchmidt
Copy link
Contributor Author

also if we have docker/Dockerfile.server.multiarch we should use it at our own build chain:

https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/docker.yaml

I moved the PR to draft, i redid the dockerfile, now it can build with two targets both scratch and alpine using --target alpine-final or final default is the scratch image.

I will look into adding it to the pipeline when i have the time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI pipeline related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants