From 4abd6a4a6a270fe7cbf94170bf755f351e7c2c63 Mon Sep 17 00:00:00 2001 From: WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> Date: Thu, 22 May 2025 19:45:13 +0100 Subject: [PATCH] Support downloading devcontainer rather than building it (#3264) --- .devcontainer/{ => Build}/devcontainer.json | 6 ++-- .devcontainer/Download/devcontainer.json | 34 +++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) rename .devcontainer/{ => Build}/devcontainer.json (94%) create mode 100644 .devcontainer/Download/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/Build/devcontainer.json similarity index 94% rename from .devcontainer/devcontainer.json rename to .devcontainer/Build/devcontainer.json index e918a62485..c16dd70a2c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/Build/devcontainer.json @@ -1,11 +1,11 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/docker-existing-dockerfile { - "name": "LibAFL Dockerfile", + "name": "Build LibAFL Dockerfile", // Sets the run context to one level up instead of the .devcontainer folder. - "context": "..", + "context": "../..", // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. - "dockerFile": "../Dockerfile", + "dockerFile": "../../Dockerfile", "customizations": { "vscode": { // Add the IDs of extensions you want installed when the container is created. diff --git a/.devcontainer/Download/devcontainer.json b/.devcontainer/Download/devcontainer.json new file mode 100644 index 0000000000..699090a4bc --- /dev/null +++ b/.devcontainer/Download/devcontainer.json @@ -0,0 +1,34 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/docker-existing-dockerfile +{ + "name": "Download LibAFL Dockerfile", + "image": "ghcr.io/aflplusplus/libafl:latest", + "customizations": { + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "rust-lang.rust-analyzer", + "microsoft.Docker" + ], + // Set *default* container specific settings.json values on container create. + "settings": { + "rust-analyzer.cargo.noDefaultFeatures": true + } + } + }, + // 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. + // Install development components that shouldn't be in the main Dockerfile + "postCreateCommand": "rustup component add rustfmt clippy llvm-tools-preview", + // Uncomment when using a ptrace-based debugger like C++, Go, and Rust + "runArgs": [ + "--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. + // "remoteUser": "vscode" +}