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

Mutli Platform Images: build arm64 images #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

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