-
Notifications
You must be signed in to change notification settings - Fork 679
FIX: Add arm64 Support for devcontainer
#1409
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
base: main
Are you sure you want to change the base?
Changes from all commits
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,4 +1,4 @@ | ||||||||||||||||||||||||||||
| FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/python:3.11 | ||||||||||||||||||||||||||||
| FROM mcr.microsoft.com/devcontainers/python:3.11 | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Makes installation faster | ||||||||||||||||||||||||||||
| ENV UV_COMPILE_BYTECODE=1 | ||||||||||||||||||||||||||||
|
|
@@ -32,15 +32,14 @@ RUN apt-get update && apt-get install -y \ | |||||||||||||||||||||||||||
| && curl -sL https://packages.microsoft.com/keys/microsoft.asc \ | ||||||||||||||||||||||||||||
| | gpg --dearmor \ | ||||||||||||||||||||||||||||
| > /usr/share/keyrings/microsoft-archive-keyring.gpg \ | ||||||||||||||||||||||||||||
| && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/debian/12/prod bookworm main" \ | ||||||||||||||||||||||||||||
| && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/debian/12/prod bookworm main" \ | ||||||||||||||||||||||||||||
| > /etc/apt/sources.list.d/microsoft.list \ | ||||||||||||||||||||||||||||
| && apt-get update \ | ||||||||||||||||||||||||||||
| && ACCEPT_EULA=Y apt-get install -y \ | ||||||||||||||||||||||||||||
| msodbcsql18 \ | ||||||||||||||||||||||||||||
| mssql-tools \ | ||||||||||||||||||||||||||||
| unixodbc-dev \ | ||||||||||||||||||||||||||||
| && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ | ||||||||||||||||||||||||||||
| ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools unixodbc-dev \ | ||||||||||||||||||||||||||||
| && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> /etc/profile.d/sqltools.sh; \ | ||||||||||||||||||||||||||||
| fi \ | ||||||||||||||||||||||||||||
| && apt-get install -y azure-cli \ | ||||||||||||||||||||||||||||
| && echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> /etc/profile.d/sqltools.sh \ | ||||||||||||||||||||||||||||
| && apt-get clean \ | ||||||||||||||||||||||||||||
| && rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -52,6 +51,10 @@ RUN apt-get update \ | |||||||||||||||||||||||||||
| libpulse0 \ | ||||||||||||||||||||||||||||
| && rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # Install Rust toolchain | ||||||||||||||||||||||||||||
| RUN curl -sSf https://sh.rustup.rs | sh -s -- -y | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
| ENV PATH="/root/.cargo/bin:${PATH}" | ||||||||||||||||||||||||||||
|
Comment on lines
+54
to
+56
|
||||||||||||||||||||||||||||
| # Install Rust toolchain | |
| RUN curl -sSf https://sh.rustup.rs | sh -s -- -y | |
| ENV PATH="/root/.cargo/bin:${PATH}" | |
| # Install Rust toolchain into a shared location accessible to all users | |
| ENV RUSTUP_HOME="/usr/local/rustup" | |
| ENV CARGO_HOME="/usr/local/cargo" | |
| RUN set -euo pipefail \ | |
| && mkdir -p "${RUSTUP_HOME}" "${CARGO_HOME}" \ | |
| && chmod -R 0755 "${RUSTUP_HOME}" "${CARGO_HOME}" \ | |
| && curl -sSf https://sh.rustup.rs -o /tmp/rustup-init.sh \ | |
| && sh /tmp/rustup-init.sh -y --no-modify-path \ | |
| && rm -f /tmp/rustup-init.sh | |
| ENV PATH="/usr/local/cargo/bin:${PATH}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| services: | ||
| devcontainer: | ||
| platform: linux/amd64 | ||
| build: | ||
| context: .. | ||
| dockerfile: .devcontainer/Dockerfile | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unixodbc-devis already installed earlier in the Dockerfile, but it’s included again in the amd64-only install list here. This is redundant and slows builds; consider droppingunixodbc-devfrom this conditional install (or removing the earlier unconditional install if you truly only want it on amd64).