Skip to content

Commit

Permalink
chore(devcontainer): update devcontainer to work with newer VSCode ve…
Browse files Browse the repository at this point in the history
…rsions
  • Loading branch information
vringar committed Mar 3, 2024
1 parent 1d797f4 commit 947fc9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "../Dockerfile",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"matklad.rust-analyzer"
],
"customizations": {
// Add the IDs of extensions you want installed when the container is created.
"vscode": {
"extensions": ["matklad.rust-analyzer", "microsoft.Docker"]
},
// Set *default* container specific settings.json values on container create.
"settings": {
"rust-analyzer.cargo.noDefaultFeatures": true
}
},
// Install development components that shouldn't be in the main Dockerfile
"initializeCommand": "rustup component add rustfmt clippy llvm-tools-preview",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created - for example installing curl.
Expand All @@ -21,7 +27,7 @@
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
]
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN rustup default nightly

# Install clang 18, common build tools
ENV LLVM_VERSION=18
RUN apt update && apt install -y build-essential gdb git wget python3-venv ninja-build lsb-release software-properties-common gnupg
RUN apt update && apt install -y build-essential gdb git wget python3-venv ninja-build lsb-release software-properties-common gnupg cmake
# Workaround until https://github.com/llvm/llvm-project/issues/62475 is resolved
RUN set -ex &&\
echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list &&\
Expand Down

0 comments on commit 947fc9f

Please sign in to comment.