Skip to content

Commit c397a55

Browse files
committed
fix: remove duplicate log, update docs for accuracy and completeness
- Remove duplicate "Creating multi-arch manifest" log from AzDO wrapper (mergeMultiPlatformImages already logs this). - Shorten GH Action group header to avoid repeating the log message. - Update General Notes to reflect GitHub's hosted ARM runners and link to the native matrix strategy. - Add missing Docker login and buildx setup steps to the AzDO native multi-platform example.
1 parent f907cd8 commit c397a55

5 files changed

Lines changed: 27 additions & 9 deletions

File tree

azdo-task/DevcontainersCi/src/docker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export async function createMultiPlatformImage(
7777
tag: string,
7878
platformTags: string[],
7979
): Promise<boolean> {
80-
console.log(`Creating multi-arch manifest for '${imageName}:${tag}'...`);
8180
try {
8281
await docker.createMultiPlatformImage(exec, imageName, tag, platformTags);
8382
return true;

docs/multi-platform-builds.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Building dev containers to support multiple platforms (aka CPU architectures) is
44

55
## General Notes/Caveats
66

7-
- Multiplatform builds utilize emulation to build on architectures not native to the system the build is running on. This will significantly increase build times over native, single architecture builds.
8-
- If you are using runCmd, the command will only be run on the architecure of the system the build is running on. This means that, if you are using runCmd to test the image, there may be bugs on the alternate platforms that will not be caught by your test suite. Manual post-build testing is advised.
9-
- As of October 2022, all hosted servers for GitHub Actions and Azure Pipelines are x86_64 only. If you want to automatically run runCmd-based tests on your devcontainer on another architecure, you'll need a self-hosted runner on that architecture. It is possible that there will be future support for hosted arm64 machines, see [here for a tracking issue for Linux](https://github.com/actions/runner-images/issues/5631).
7+
- Emulation-based multiplatform builds (using QEMU) will significantly increase build times over native, single architecture builds. For faster builds, consider using the [native matrix strategy](#native-multi-platform-builds-matrix-strategy) instead.
8+
- If you are using runCmd, the command will only be run on the architecture of the system the build is running on. This means that, if you are using runCmd to test the image, there may be bugs on the alternate platforms that will not be caught by your test suite. Manual post-build testing is advised.
9+
- GitHub Actions now offers hosted ARM runners (e.g. `ubuntu-24.04-arm`). For Azure Pipelines, you will need a self-hosted ARM agent for native ARM builds.
1010

1111
## GitHub Actions Example
1212

@@ -141,6 +141,13 @@ stages:
141141
pool:
142142
vmImage: ubuntu-latest
143143
steps:
144+
- task: Docker@2
145+
displayName: Login to Container Registry
146+
inputs:
147+
command: login
148+
containerRegistry: RegistryNameHere
149+
- script: docker buildx create --use
150+
displayName: Set up docker buildx
144151
- task: DevcontainersCi@0
145152
inputs:
146153
imageName: myregistry.azurecr.io/devcontainer
@@ -152,6 +159,13 @@ stages:
152159
pool:
153160
name: 'Self-Hosted-ARM64' # Use an ARM64 agent for native builds
154161
steps:
162+
- task: Docker@2
163+
displayName: Login to Container Registry
164+
inputs:
165+
command: login
166+
containerRegistry: RegistryNameHere
167+
- script: docker buildx create --use
168+
displayName: Set up docker buildx
155169
- task: DevcontainersCi@0
156170
inputs:
157171
imageName: myregistry.azurecr.io/devcontainer
@@ -166,6 +180,13 @@ stages:
166180
pool:
167181
vmImage: ubuntu-latest
168182
steps:
183+
- task: Docker@2
184+
displayName: Login to Container Registry
185+
inputs:
186+
command: login
187+
containerRegistry: RegistryNameHere
188+
- script: docker buildx create --use
189+
displayName: Set up docker buildx
169190
- task: DevcontainersCi@0
170191
inputs:
171192
imageName: myregistry.azurecr.io/devcontainer

github-action/dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ function pushImage(imageName, imageTag) {
20032003
}
20042004
function createMultiPlatformImage(imageName, tag, platformTags) {
20052005
return __awaiter(this, void 0, void 0, function* () {
2006-
core.startGroup(`📦 Creating multi-arch manifest for '${imageName}:${tag}'...`);
2006+
core.startGroup(`📦 ${imageName}:${tag}`);
20072007
try {
20082008
yield docker.createMultiPlatformImage(exec_1.exec, imageName, tag, platformTags);
20092009
return true;

github-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github-action/src/docker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ export async function createMultiPlatformImage(
8383
tag: string,
8484
platformTags: string[],
8585
): Promise<boolean> {
86-
core.startGroup(
87-
`📦 Creating multi-arch manifest for '${imageName}:${tag}'...`,
88-
);
86+
core.startGroup(`📦 ${imageName}:${tag}`);
8987
try {
9088
await docker.createMultiPlatformImage(exec, imageName, tag, platformTags);
9189
return true;

0 commit comments

Comments
 (0)