From 2a2524cc7c7143a0a998385e9386c026940e4b3c Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Thu, 21 Nov 2024 22:40:16 +0200 Subject: [PATCH 1/3] Create devcontainer.json --- .devcontainer/devcontainer.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000000..0f5ec1891fe1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "Rust Development Environment", + "image": "mcr.microsoft.com/devcontainers/rust:latest", + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer" + ] + } + } +} From c48af3f61f3903bf32d52654470a3f28b0e788cd Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:10:09 +0000 Subject: [PATCH 2/3] update devcontainer --- .devcontainer/Dockerfile | 13 +++++++++++++ .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000000..9dd627b01abe --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,13 @@ +FROM rust:bookworm + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + # Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131 + && apt-get purge -y imagemagick imagemagick-6-common + +# Add protoc +# https://datafusion.apache.org/contributor-guide/getting_started.html#protoc-installation +RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip \ + && unzip protoc-25.1-linux-x86_64.zip -d $HOME/.local \ + && rm protoc-25.1-linux-x86_64.zip + +ENV PATH="$PATH:$HOME/.local/bin" \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0f5ec1891fe1..b8d494d9c23d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,29 @@ { - "name": "Rust Development Environment", - "image": "mcr.microsoft.com/devcontainers/rust:latest", + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, "customizations": { "vscode": { "extensions": [ "rust-lang.rust-analyzer" ] } - } -} + }, + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": "true", + "username": "vscode", + "userUid": "1000", + "userGid": "1000", + "upgradePackages": "true" + }, + "ghcr.io/devcontainers/features/rust:1": "latest", + "ghcr.io/devcontainers/features/git:1": { + "version": "latest", + "ppa": "false" + } + }, + // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file From 974f5c4602c1d7c339ac0d37c20c829bcb4c9379 Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Thu, 21 Nov 2024 23:19:41 +0200 Subject: [PATCH 3/3] remove useless features --- .devcontainer/devcontainer.json | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b8d494d9c23d..1af22306ed8c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,19 +11,6 @@ } }, "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": "true", - "username": "vscode", - "userUid": "1000", - "userGid": "1000", - "upgradePackages": "true" - }, - "ghcr.io/devcontainers/features/rust:1": "latest", - "ghcr.io/devcontainers/features/git:1": { - "version": "latest", - "ppa": "false" - } - }, - // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode" -} \ No newline at end of file + "ghcr.io/devcontainers/features/rust:1": "latest" + } +}