Skip to content

Conversation

@opajonk
Copy link
Contributor

@opajonk opajonk commented Sep 23, 2025

With this change, in addition to the amd64 (x86_64) container, an aarch64 container is built. This should be useful for anyone using e.g. an Apple-M-series-based computer. Also, the latest tag is now updated along with the tag builds created from Git tags. The main tag is now used for tracking builds created from the main Git branch.

Closes #23

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed when bazelisk is there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least if you want that the command is ready right after container start...

@opajonk opajonk marked this pull request as ready for review October 7, 2025 08:50
Copy link
Contributor

@lurtz lurtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPDATE fixed with pushed commit

I cannot build the container locally anymore

node ➜ /workspaces/devcontainer (aarch64_support) $ ./scripts/build.sh
+ devcontainer build --platform linux/aarch64 --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer:latest --cache-from ghcr.io/eclipse-score/devcontainer
[8 ms] @devcontainers/cli 0.80.1. Node.js v18.16.0. linux 6.8.0-85-generic x64.
[233 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/git'...
[1151 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/git-lfs'...
[1661 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/common-utils'...
[1969 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers-community/features/llvm'...
[2484 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/python'...
[3396 ms] Resolving Feature dependencies for './s-core-local'...
[4530 ms] Soft-dependency 'ghcr.io/devcontainers/features/oryx' is not required.  Removing from installation order...
[5084 ms] Files to omit: ''
[5410 ms] Files to omit: ''
[5732 ms] Files to omit: ''
[6169 ms] Files to omit: ''
[6465 ms] Files to omit: ''
[6495 ms] Start: Run: docker buildx build --platform linux/aarch64 --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-node/container-features/0.80.1-1759834125199/Dockerfile-with-features -t ghcr.io/eclipse-score/devcontainer:latest --target dev_containers_target_stage --cache-from ghcr.io/eclipse-score/devcontainer --build-context dev_containers_feature_content_source=/tmp/devcontainercli-node/container-features/0.80.1-1759834125199 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/devcontainer/src/s-core-devcontainer/.devcontainer
[+] Building 2.6s (10/21)                                                                                                           docker:default
 => [internal] load build definition from Dockerfile-with-features                                                                            0.0s
 => => transferring dockerfile: 8.18kB                                                                                                        0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1.4                                                                   1.5s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc             0.0s
 => [internal] load .dockerignore                                                                                                             0.0s
 => => transferring context: 2B                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/buildpack-deps:noble-curl                                                                  0.7s
 => [context dev_containers_feature_content_source] load .dockerignore                                                                        0.0s
 => => transferring dev_containers_feature_content_source: 2B                                                                                 0.0s
 => importing cache manifest from ghcr.io/eclipse-score/devcontainer                                                                          0.0s
 => [context dev_containers_feature_content_source] load from client                                                                          0.0s
 => => transferring dev_containers_feature_content_source: 197.97kB                                                                           0.0s
 => CACHED [dev_container_auto_added_stage_label 1/2] FROM docker.io/library/buildpack-deps:noble-curl@sha256:5b15b704c070d22e7c07f71f69ba1c  0.0s
 => ERROR [dev_container_auto_added_stage_label 2/2] RUN if [ "noble" = "noble" ]; then         if id "ubuntu" &>/dev/null; then              0.2s
------                                                                                                                                             
 > [dev_container_auto_added_stage_label 2/2] RUN if [ "noble" = "noble" ]; then         if id "ubuntu" &>/dev/null; then             echo "Deleting user 'ubuntu'  for noble" && userdel -f -r ubuntu || echo "Failed to delete ubuntu user for noble";         else             echo "User 'ubuntu' does not exist for noble";         fi;     fi:
0.145 exec /bin/sh: exec format error
------
ERROR: failed to build: failed to solve: process "/bin/sh -c if [ \"$VARIANT\" = \"noble\" ]; then         if id \"ubuntu\" &>/dev/null; then             echo \"Deleting user 'ubuntu'  for $VARIANT\" && userdel -f -r ubuntu || echo \"Failed to delete ubuntu user for $VARIANT\";         else             echo \"User 'ubuntu' does not exist for $VARIANT\";         fi;     fi" did not complete successfully: exit code: 255
Error: Command failed: docker buildx build --platform linux/aarch64 --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-node/container-features/0.80.1-1759834125199/Dockerfile-with-features -t ghcr.io/eclipse-score/devcontainer:latest --target dev_containers_target_stage --cache-from ghcr.io/eclipse-score/devcontainer --build-context dev_containers_feature_content_source=/tmp/devcontainercli-node/container-features/0.80.1-1759834125199 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/devcontainer/src/s-core-devcontainer/.devcontainer
    at F6 (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:468:1988)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async pw (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:467:1886)
    at async k7 (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:667:2203)
    at async R7 (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:666:4937)
    at async /usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:1188
{"outcome":"error","message":"Command failed: docker buildx build --platform linux/aarch64 --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-node/container-features/0.80.1-1759834125199/Dockerfile-with-features -t ghcr.io/eclipse-score/devcontainer:latest --target dev_containers_target_stage --cache-from ghcr.io/eclipse-score/devcontainer --build-context dev_containers_feature_content_source=/tmp/devcontainercli-node/container-features/0.80.1-1759834125199 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/devcontainer/src/s-core-devcontainer/.devcontainer","description":"An error occurred building the image."}

Comment on lines 6 to 7
devcontainer build --push --platform linux/aarch64 --workspace-folder src/s-core-devcontainer --image-name "ghcr.io/eclipse-score/devcontainer:${TAG}" --cache-from ghcr.io/eclipse-score/devcontainer
devcontainer build --push --platform linux/amd64 --workspace-folder src/s-core-devcontainer --image-name "ghcr.io/eclipse-score/devcontainer:${TAG}" --cache-from ghcr.io/eclipse-score/devcontainer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is now the plan to update the latest tag? I was expecting that latest always points to the last release, which is not the case anymore.

Copy link
Contributor

@lurtz lurtz Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed tags in discussion

  • latest points to last released <version>
  • main points to state of most recent commit in main branch
  • <version> points to container build from git tag that has been deemed releasable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure: devcontainer build must use the lockfile, not update it silently

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local test showed that modifying hashes in the lock file resulted in an build error. After I reverted my changes, the build worked again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed tags in discussion

  • latest points to last released <version>
  • main points to state of most recent commit in main branch
  • <version> points to container build from git tag that has been deemed releasable

Done like that

"ghcr.io/devcontainers/features/git-lfs",
"ghcr.io/devcontainers/features/common-utils",
"ghcr.io/devcontainers-community/features/llvm",
"ghcr.io/devcontainers/features/python",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rust feature is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@AlexanderLanin AlexanderLanin merged commit 72f458e into eclipse-score:main Oct 10, 2025
2 checks passed
@olivembo
Copy link

UPDATE fixed with pushed commit

I cannot build the container locally anymore

node ➜ /workspaces/devcontainer (aarch64_support) $ ./scripts/build.sh
+ devcontainer build --platform linux/aarch64 --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer:latest --cache-from ghcr.io/eclipse-score/devcontainer
[8 ms] @devcontainers/cli 0.80.1. Node.js v18.16.0. linux 6.8.0-85-generic x64.
[233 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/git'...
[1151 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/git-lfs'...
[1661 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/common-utils'...
[1969 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers-community/features/llvm'...
[2484 ms] Resolving Feature dependencies for 'ghcr.io/devcontainers/features/python'...
[3396 ms] Resolving Feature dependencies for './s-core-local'...
[4530 ms] Soft-dependency 'ghcr.io/devcontainers/features/oryx' is not required.  Removing from installation order...
[5084 ms] Files to omit: ''
[5410 ms] Files to omit: ''
[5732 ms] Files to omit: ''
[6169 ms] Files to omit: ''
[6465 ms] Files to omit: ''
[6495 ms] Start: Run: docker buildx build --platform linux/aarch64 --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-node/container-features/0.80.1-1759834125199/Dockerfile-with-features -t ghcr.io/eclipse-score/devcontainer:latest --target dev_containers_target_stage --cache-from ghcr.io/eclipse-score/devcontainer --build-context dev_containers_feature_content_source=/tmp/devcontainercli-node/container-features/0.80.1-1759834125199 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/devcontainer/src/s-core-devcontainer/.devcontainer
[+] Building 2.6s (10/21)                                                                                                           docker:default
 => [internal] load build definition from Dockerfile-with-features                                                                            0.0s
 => => transferring dockerfile: 8.18kB                                                                                                        0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1.4                                                                   1.5s
 => CACHED docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc             0.0s
 => [internal] load .dockerignore                                                                                                             0.0s
 => => transferring context: 2B                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/buildpack-deps:noble-curl                                                                  0.7s
 => [context dev_containers_feature_content_source] load .dockerignore                                                                        0.0s
 => => transferring dev_containers_feature_content_source: 2B                                                                                 0.0s
 => importing cache manifest from ghcr.io/eclipse-score/devcontainer                                                                          0.0s
 => [context dev_containers_feature_content_source] load from client                                                                          0.0s
 => => transferring dev_containers_feature_content_source: 197.97kB                                                                           0.0s
 => CACHED [dev_container_auto_added_stage_label 1/2] FROM docker.io/library/buildpack-deps:noble-curl@sha256:5b15b704c070d22e7c07f71f69ba1c  0.0s
 => ERROR [dev_container_auto_added_stage_label 2/2] RUN if [ "noble" = "noble" ]; then         if id "ubuntu" &>/dev/null; then              0.2s
------                                                                                                                                             
 > [dev_container_auto_added_stage_label 2/2] RUN if [ "noble" = "noble" ]; then         if id "ubuntu" &>/dev/null; then             echo "Deleting user 'ubuntu'  for noble" && userdel -f -r ubuntu || echo "Failed to delete ubuntu user for noble";         else             echo "User 'ubuntu' does not exist for noble";         fi;     fi:
0.145 exec /bin/sh: exec format error
------
ERROR: failed to build: failed to solve: process "/bin/sh -c if [ \"$VARIANT\" = \"noble\" ]; then         if id \"ubuntu\" &>/dev/null; then             echo \"Deleting user 'ubuntu'  for $VARIANT\" && userdel -f -r ubuntu || echo \"Failed to delete ubuntu user for $VARIANT\";         else             echo \"User 'ubuntu' does not exist for $VARIANT\";         fi;     fi" did not complete successfully: exit code: 255
Error: Command failed: docker buildx build --platform linux/aarch64 --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-node/container-features/0.80.1-1759834125199/Dockerfile-with-features -t ghcr.io/eclipse-score/devcontainer:latest --target dev_containers_target_stage --cache-from ghcr.io/eclipse-score/devcontainer --build-context dev_containers_feature_content_source=/tmp/devcontainercli-node/container-features/0.80.1-1759834125199 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/devcontainer/src/s-core-devcontainer/.devcontainer
    at F6 (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:468:1988)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async pw (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:467:1886)
    at async k7 (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:667:2203)
    at async R7 (/usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:666:4937)
    at async /usr/local/share/npm-global/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:1188
{"outcome":"error","message":"Command failed: docker buildx build --platform linux/aarch64 --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-node/container-features/0.80.1-1759834125199/Dockerfile-with-features -t ghcr.io/eclipse-score/devcontainer:latest --target dev_containers_target_stage --cache-from ghcr.io/eclipse-score/devcontainer --build-context dev_containers_feature_content_source=/tmp/devcontainercli-node/container-features/0.80.1-1759834125199 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /workspaces/devcontainer/src/s-core-devcontainer/.devcontainer","description":"An error occurred building the image."}

Has this been fixed meanwhile? I still get the error.

@lurtz
Copy link
Contributor

lurtz commented Oct 23, 2025

@olivembo This should have been fixed with 3192e3d

Maybe you need to rebuild the container, which is used to build the devcontainer.

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.

Support aarch64 in DevContainer

4 participants