Skip to content

Build the Linux Tentacle container image for arm64 as well as amd64 - #1380

Open
rhysparry wants to merge 1 commit into
mainfrom
rhys/lev-2388/arm64-container
Open

rhysparry wants to merge 1 commit into
mainfrom
rhys/lev-2388/arm64-container

Conversation

@rhysparry

@rhysparry rhysparry commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Background

The octopusdeploy/tentacle Linux image has only ever been published for amd64, so customers can't run it on arm64 hosts such as AWS Graviton. The build already makes an arm64 Tentacle package, and PackDebianPackage already copies each architecture's package to _artifacts/docker/, where the Kubernetes agent image picks it up. The Linux image's Dockerfile just hard-coded the amd64 package.

Publishing two architectures under one tag also means "Build: Docker manifest" has to go. It made <version> from <version>-linux with docker manifest create, which refuses a source that's already a multi-architecture image.

Results

Fixes #374

  • docker/linux/Dockerfile installs _artifacts/docker/tentacle_<version>_linux-<TARGETARCH>.deb, so it builds for whichever platform BuildKit is targeting.
  • A new BuildAndPushLinuxTentacleContainerImage Nuke target:
    • builds the image for linux/arm64 and linux/amd64 (DockerPlatform) with buildx;
    • pushes it as <version>-linux and as <version>, which is what Octopus copies to Docker Hub with skopeo copy --all;
    • creates a temporary docker-container builder, because Docker's default builder can't build for several platforms, and always removes it afterwards.
  • BuildAndLoadLocallyLinuxTentacleContainerImage builds one platform into the local Docker, using the host's architecture by default.
  • docker-compose.build.yml still builds a single architecture, chosen by BUILD_ARCH (amd64 by default). It's used by the test script, and by TeamCity for branches from before this change.
  • build-and-test-linux-docker-image.sh takes --platform linux/amd64 or --platform linux/arm64. In its end-to-end stage, SQL Server and Octopus Server stay on amd64, as they have no arm64 images.

TeamCity

These changes are already made in the TeamCity UI (LEV-2388):

  • "Build: Linux Docker image" now runs one script step:
    • if .nuke/build.schema.json lists BuildAndPushLinuxTentacleContainerImage, it runs that target;
    • otherwise it builds and pushes amd64 with docker-compose as before, and also pushes <version>.
  • The build sets env.OCTOVERSION_FullSemVer to %build.number%, as the other Nuke builds do, so the image's tags and the package it installs match the chain's version.
  • "Build: Docker manifest" is deleted, and "Gate: Integration Tests" no longer depends on it.

This PR's build is the first to take the new path. On every other branch, TeamCity uses the docker-compose fallback.

How to review this PR

Quality ✔️

  • build/Build.Pack.cs: the new targets and BuildLinuxTentacleContainerImage. They're separate from the Kubernetes agent image's helper; the two only share the buildx call.
  • This PR's "Build: Linux Docker image" build:
    • it should run the new target;
    • docker buildx imagetools inspect docker.packages.octopushq.com/octopusdeploy/tentacle:<version> should list both linux/amd64 and linux/arm64;
    • "Test: Linux Docker Image" runs on an amd64 agent, so it pulls the amd64 image from that tag.
  • To test an architecture locally: ./testing/docker-linux/build-and-test-linux-docker-image.sh --platform linux/arm64. It builds the package and the image, then runs the smoke and end-to-end tests.

🤖 Generated with Claude Code

🤖 Agent's description, endorsed by Rhys

The octopusdeploy/tentacle image has only ever been published for amd64
(#374). The build already produces an arm64 Tentacle package, so the image
only needed to pick the right package for the platform being built.
@rhysparry
rhysparry marked this pull request as ready for review November 26, 2026 03:13
@rhysparry
rhysparry requested a review from a team as a code owner November 26, 2026 03:13
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.

ARM64 supported container image building for Tentacle

2 participants