Skip to content

Conversation

@a-mnich
Copy link

@a-mnich a-mnich commented Mar 6, 2025

Name: Multi Platform Images
About: switched build workflow to multi platform images

Intention:

I'm running a k8s cluster with arm64 only nodes. As the containerSSH images previously were amd64 only I wasn't able to run it on those nodes. As there are already arm64 binaries building arm64 images is also possible.

Changes

Improvements to Docker and Docker Compose:

  • .github/workflows/push.yml and .github/workflows/tag.yml: Updated the Docker Buildx setup to include multi-platform support for linux/amd64 and linux/arm64. "docker-compose" install isn't needed anymore as buildx contains "docker compose" [1] [2]
  • docker-compose.yaml: Added platform specifications for linux/amd64 and linux/arm64 to the build contexts for containerssh and containerssh-test-authconfig services. [1] [2]

Updates to build.go script:

  • Replaced docker-compose commands with docker compose as docker-compose is legacy and not included in standard buildx installations anymore. [1] [2] [3] [4] [5] [6]
  • Introduced a new optional OrganisationVariable field in the registry struct to support organization-specific image naming. This is especially usefull when testing the build with a private registry where the organizational name isn't equal to the username username.

Documentation updates:

  • README.md: Updated references from docker-compose to docker compose and revised example environment variable values. [1] [2] [3]

Other changes:

  • build.yaml: Dropped build of versions which don't have arm64 binaries
  • containerssh-test-authconfig/Dockerfile and containerssh/Dockerfile: Added TARGETOS and TARGETARCH arguments to support multi-platform builds. [1] [2] [3] [4]

Organisational

Are you the owner of the code or do you have permission of the owner?
Yes

The code will be published under the MIT-0 license. Have you read and understood this license?
Yes

a-mnich added 2 commits March 14, 2025 22:33
Signed-off-by: Alexander Mnich <alex@mnich.dev>
Signed-off-by: Alexander Mnich <alex@mnich.dev>
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.

1 participant