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

Build most linux container images as multi-arch including arm64 #11341

Merged
merged 1 commit into from Mar 4, 2023

Conversation

chadlwilson
Copy link
Member

@chadlwilson chadlwilson commented Feb 27, 2023

  • Alpine is excluded for now, due to issues with Tanuki wrapper requiring glibc to work on Alpine, and alpine-glibc packages not being available. (Provide arm64/aarch64 Alpine agent container image variants #11355)
  • Requires docker buildx plugin to be installed (cleaner errors if not available would probably be useful)
  • Built tarballs for all images are changed to OCI format/layout. Since layers are already gzipped here, we remove the additional gzipping which adds little value but adds complexity
  • Archived tarballs cannot be directly docker loaded as docker load only understands its native format. Needs a tool like regclient/regctl to export as docker format for docker load so this logic needs incorporation into later steps (functional tests, code signing and docker hub push)
  • Currently, only the native build platform image is sanity-checked by starting it now when building multiple archs. Starting cross-platform via emulation seems unreliable or unpredictable much of the time - at least locally on Mac M1 via colima/QEMU.

Related tasks downstream

- Alpine is excluded for now, due to issues with Tanuki wrapper requiring glibc to work on Alpine, and alpine-glibc packages not being available.
- Requires docker buildx plugin to be installed (cleaner errors if not available would probably be useful)
- Built tarballs for all images are changed to OCI format/layout. Since layers are already gzipped here, we remove the additional gzipping which adds little value but adds complexity
- Archived tarballs cannot be directly docker loaded as docker load only understands its native format. Needs a tool like regclient/regctl to export as docker format for docker load so this logic needs incorporation into later steps (functional tests, code signing and docker hub push)
- Currently, only the native build platform image is sanity-checked by starting it now when building multiple archs. Starting cross-platform via emulation seems unreliable most of the time - at least locally.
@chadlwilson chadlwilson self-assigned this Feb 27, 2023
@chadlwilson chadlwilson marked this pull request as ready for review March 4, 2023 07:34
@chadlwilson chadlwilson added this to the Release 23.1.0 milestone Mar 4, 2023
@chadlwilson chadlwilson merged commit 6b3c7d7 into gocd:master Mar 4, 2023
@chadlwilson chadlwilson deleted the docker-multi-arch branch March 4, 2023 07:40
@chadlwilson
Copy link
Member Author

chadlwilson commented Mar 4, 2023

Example manifest for agents looks like

[
  {
    "file": "gocd-agent-gocd-agent-alpine-3.14-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-alpine-3.14",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-alpine-3.15-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-alpine-3.15",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-alpine-3.16-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-alpine-3.16",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-alpine-3.17-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-alpine-3.17",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-centos-7-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-centos-7",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-centos-8-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-centos-8",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-centos-9-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-centos-9",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-debian-10-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-debian-10",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-debian-11-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-debian-11",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-docker-dind-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-docker-dind",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-ubuntu-18.04-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-ubuntu-18.04",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-ubuntu-20.04-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-ubuntu-20.04",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  },
  {
    "file": "gocd-agent-gocd-agent-ubuntu-22.04-v23.1.0-16028.tar",
    "format": "oci",
    "imageName": "gocd-agent-ubuntu-22.04",
    "tag": "v23.1.0-16028",
    "platforms": [
      "linux/amd64",
      "linux/arm64"
    ]
  }
]

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

Successfully merging this pull request may close these issues.

Enable GoCD server/agent install to Linux ARM / aarch64 system architectures
1 participant