Skip to content

FIX: Add arm64 Support for devcontainer#1409

Merged
spencrr merged 1 commit intoAzure:mainfrom
spencrr:spencrr/fix-arm-devcontainer
Mar 4, 2026
Merged

FIX: Add arm64 Support for devcontainer#1409
spencrr merged 1 commit intoAzure:mainfrom
spencrr:spencrr/fix-arm-devcontainer

Conversation

@spencrr
Copy link
Contributor

@spencrr spencrr commented Feb 27, 2026

Description

Fixes the devcontainer to support both amd64 and arm64 architectures. Previously, the Dockerfile and docker-compose.yml hardcoded linux/amd64, which caused issues on ARM-based machines.

Changes

  • Removed --platform=linux/amd64 from the FROM instruction in .devcontainer/Dockerfile so Docker uses the host's native architecture.
  • Removed platform: linux/amd64 from .devcontainer/docker-compose.yml.
  • Made the Microsoft apt repo arch-aware by replacing the hardcoded arch=amd64 with arch=$(dpkg --print-architecture).
  • Updated mssql-tools to mssql-tools18, which adds arm64 support (the older mssql-tools package was amd64-only). Removed the redundant unixodbc-dev install (already installed in the earlier apt-get block).

Tests and Documentation

  • No test or documentation changes required; this is an infrastructure/devcontainer-only change.
  • Verified the devcontainer builds and starts successfully on arm64.

@spencrr spencrr self-assigned this Feb 27, 2026
Copilot AI review requested due to automatic review settings February 27, 2026 00:42
@spencrr
Copy link
Contributor Author

spencrr commented Feb 27, 2026

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the devcontainer configuration to build and run on both amd64 and arm64 hosts by removing hardcoded amd64 platform targeting and making Microsoft repo/package installation architecture-aware.

Changes:

  • Removed linux/amd64 platform pinning from the devcontainer Dockerfile and docker-compose configuration.
  • Made the Microsoft apt repo entry use the host architecture and installed MSSQL tooling only on amd64.
  • Added Rust toolchain installation to support building Python dependencies on platforms without prebuilt wheels (e.g., arm64).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.devcontainer/docker-compose.yml Removes amd64-only platform pin so Compose uses the native host architecture.
.devcontainer/Dockerfile Removes amd64-only base image constraint; makes Microsoft apt repo arch-aware; conditionally installs MSSQL tools; adds Rust toolchain.

@spencrr spencrr force-pushed the spencrr/fix-arm-devcontainer branch 2 times, most recently from 7101576 to b9f316c Compare March 3, 2026 04:43
Copilot AI review requested due to automatic review settings March 3, 2026 04:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@spencrr spencrr force-pushed the spencrr/fix-arm-devcontainer branch 2 times, most recently from fd3a090 to 1b7b0aa Compare March 3, 2026 08:08
@spencrr spencrr requested a review from Copilot March 3, 2026 08:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@spencrr spencrr requested a review from romanlutz March 3, 2026 19:24
Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

I'm approving hoping this works on Mac. @riyosha can perhaps confirm.

@spencrr spencrr removed their assignment Mar 4, 2026
@riyosha
Copy link
Contributor

riyosha commented Mar 4, 2026

I'm approving hoping this works on Mac. @riyosha can perhaps confirm.

I checked this, the devcontainer setup works on Mac!

@spencrr
Copy link
Contributor Author

spencrr commented Mar 4, 2026

I'm approving hoping this works on Mac. @riyosha can perhaps confirm.

@romanlutz I tried out on an M1 Mac (arm64) - maybe we can add a macos github actions smoketest workflow🤔

Details

 docker buildx build .
[+] Building 0.1s (15/15) FINISHED                                                                                  docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 3.75kB                                                                                              0.0s
 => [internal] load metadata for mcr.microsoft.com/devcontainers/python:3.11                                                        0.0s
 => [internal] load .dockerignore                                                                                                   0.0s
 => => transferring context: 2B                                                                                                     0.0s
 => [ 1/11] FROM mcr.microsoft.com/devcontainers/python:3.11                                                                        0.0s
 => CACHED [ 2/11] RUN rm -f /etc/apt/sources.list.d/yarn.list 2>/dev/null || true                                                  0.0s
 => CACHED [ 3/11] RUN apt-get update && apt-get install -y     sudo     unixodbc     unixodbc-dev     libgl1     git     curl      0.0s
 => CACHED [ 4/11] RUN apt-get update && apt-get install -y       apt-transport-https       ca-certificates       gnupg       lsb-  0.0s
 => CACHED [ 5/11] RUN apt-get update  && DEBIAN_FRONTEND=noninteractive  apt-get install -y --no-install-recommends       libasou  0.0s
 => CACHED [ 6/11] RUN curl -LsSf https://astral.sh/uv/install.sh | sh  && mv /root/.local/bin/uv /usr/local/bin/uv  && rm -rf /op  0.0s
 => CACHED [ 7/11] RUN echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers                                                         0.0s
 => CACHED [ 8/11] RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -  && apt-get install -y nodejs  && npm install -g   0.0s
 => CACHED [ 9/11] RUN mkdir -p /home/vscode/.cache/pre-commit  && mkdir -p /home/vscode/.vscode-server  && mkdir -p /home/vscode/  0.0s
 => CACHED [10/11] RUN touch /home/vscode/.bashrc /home/vscode/.bash_profile  && echo "[ -f /opt/venv/bin/activate ] && source /op  0.0s
 => CACHED [11/11] RUN git config --global core.preloadindex true  && git config --global core.fscache true  && git config --globa  0.0s
 => exporting to image                                                                                                              0.0s
 => => exporting layers                                                                                                             0.0s
 => => writing image sha256:3e84e0f8b7f8699803802b15a7ca95993eea9b09cb5a15525a5cbfc73b9aa431

@romanlutz
Copy link
Contributor

Thanks @riyosha and @spencrr !

@spencrr spencrr force-pushed the spencrr/fix-arm-devcontainer branch from 347a824 to d4bfdda Compare March 4, 2026 01:25
@spencrr spencrr merged commit bed086e into Azure:main Mar 4, 2026
29 checks passed
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.

5 participants