-
Notifications
You must be signed in to change notification settings - Fork 6
Add aarch64 support to DevContainer
#29
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
Changes from all commits
0dcd7ea
e14fb7c
f809944
a0013b9
fee872a
b7c83fa
ea41290
8641f0d
7e9d422
8d44935
372f2c6
85dc9cf
188f403
3192e3d
ed066d5
6bbaf80
8762a58
fc99f42
bfee013
6f8c432
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| npm install -g @devcontainers/cli | ||
| pre-commit install | ||
|
|
||
| scripts/create_builder.sh |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| set -euxo pipefail | ||
|
|
||
| devcontainer build --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer:latest --cache-from ghcr.io/eclipse-score/devcontainer | ||
| devcontainer build --platform linux/aarch64 --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer --cache-from ghcr.io/eclipse-score/devcontainer | ||
| devcontainer build --platform linux/amd64 --workspace-folder src/s-core-devcontainer --image-name ghcr.io/eclipse-score/devcontainer --cache-from ghcr.io/eclipse-score/devcontainer |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/usr/bin/env bash | ||
| set -euxo pipefail | ||
|
|
||
| docker buildx create --name multiarch --driver docker-container --use |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,19 @@ | ||
| #!/usr/bin/env bash | ||
| set -euxo pipefail | ||
|
|
||
| TAG="${1:-latest}" | ||
|
|
||
| if [[ "$TAG" != "latest" ]]; then | ||
| docker tag "ghcr.io/eclipse-score/devcontainer:latest" "ghcr.io/eclipse-score/devcontainer:${TAG}" | ||
| IMAGES=("--image-name \"ghcr.io/eclipse-score/devcontainer:main\"") | ||
| if [ "$#" -gt 0 ]; then | ||
| IMAGES=() | ||
| for arg in "$@"; do | ||
| IMAGES+=("--image-name \"ghcr.io/eclipse-score/devcontainer:${arg}\"") | ||
| done | ||
| fi | ||
|
|
||
| docker push "ghcr.io/eclipse-score/devcontainer:${TAG}" | ||
| DEVCONTAINER_CALL="devcontainer build --push --workspace-folder src/s-core-devcontainer --cache-from ghcr.io/eclipse-score/devcontainer" | ||
|
|
||
| for IMAGE in "${IMAGES[@]}"; do | ||
| DEVCONTAINER_CALL+=" $IMAGE" | ||
| done | ||
|
|
||
| eval "$DEVCONTAINER_CALL --platform linux/aarch64" | ||
| eval "$DEVCONTAINER_CALL --platform linux/amd64" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,8 +42,18 @@ | |
| }, | ||
| "./s-core-local": {} | ||
| }, | ||
| "overrideFeatureInstallOrder": [ | ||
| // this order makes it more convenient to develop the s-core-local feature, since it will be installed last | ||
| // which means changes to it will be applied without needing to rebuild all other features | ||
| "ghcr.io/devcontainers/features/git", | ||
| "ghcr.io/devcontainers/features/git-lfs", | ||
| "ghcr.io/devcontainers/features/common-utils", | ||
| "ghcr.io/devcontainers-community/features/llvm", | ||
| "ghcr.io/devcontainers/features/rust", | ||
| "ghcr.io/devcontainers/features/python", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rust feature is missing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
| "./s-core-local" | ||
| ], | ||
| "remoteUser": "vscode", | ||
| "initializeCommand": "mkdir -p ${localEnv:HOME}/.cache/bazel", | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this still needed when bazelisk is there?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| #!/usr/bin/env bash | ||
| set -eo pipefail | ||
|
|
||
| if [ -f .bazelversion ] && [ "$(cat .bazelversion)" != "$(dpkg --list | grep 'ii bazel ' | awk '{print $3}')" ]; then | ||
| sudo apt-get update && sudo apt-get install -y --allow-downgrades bazel=$(cat .bazelversion) | ||
| if [ -f .bazelversion ] && [ "$(cat .bazelversion)" != "$(bazel version | grep 'Build label:' | awk '{print $3}')" ]; then | ||
| # Pre-install the matching Bazel version, setup the bash command completion | ||
| USE_BAZEL_VERSION=$(cat .bazelversion) | ||
| bazel help completion bash > /tmp/bazel-complete.bash | ||
| sudo mv /tmp/bazel-complete.bash /etc/bash_completion.d/bazel-complete.bash | ||
| sudo sed -i '/^USE_BAZEL_VERSION=/c\USE_BAZEL_VERSION=${USE_BAZEL_VERSION}' /etc/profile.d/bazel.sh || true | ||
| fi |
Uh oh!
There was an error while loading. Please reload this page.