From 1b002ffa0896ffa45e12defe31586a46a7596cad Mon Sep 17 00:00:00 2001 From: Kalen Brunham Date: Sun, 24 Dec 2023 00:56:03 +0000 Subject: [PATCH 1/4] Initial version --- .devcontainer/Dockerfile | 4 ++ .devcontainer/devcontainer.json | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..c1136fc79 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,4 @@ +# Available versions: https://github.com/devcontainers/images/tree/main/src/ruby +FROM mcr.microsoft.com/devcontainers/cpp:ubuntu-22.04 +RUN apt update && apt install -y clang-format clang-tidy +RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel && chmod a+rx /usr/local/bin/bazel && /usr/local/bin/bazel --version diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..f60b31c4a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,66 @@ + +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node +{ + "name": "Verible Dev", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + // "image": "amr-registry.caas.intel.com/fpga-simics/devenv/ubuntu22-dev:1.0", + //"image": "mcr.microsoft.com/devcontainers/base:jammy", + //"image": "mcr.microsoft.com/devcontainers/universal:2-linux", + + "build": { + "dockerfile": "Dockerfile", + "args" : { + "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", + "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", + "http_proxy": "http://proxy-dmz.intel.com:912/", + "https_proxy": "http://proxy-dmz.intel.com:912/" + } + }, + + + "remoteEnv": { + "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", + "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", + "http_proxy": "http://proxy-dmz.intel.com:912/", + "https_proxy": "http://proxy-dmz.intel.com:912/", + "npm_config_proxy": "http://proxy-dmz.intel.com:912/", + "npm_config_https_proxy": "http://proxy-dmz.intel.com:912/" + }, + + + "containerEnv": { + "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", + "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", + "http_proxy": "http://proxy-dmz.intel.com:912/", + "https_proxy": "http://proxy-dmz.intel.com:912/" + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // devcontainer.json +// "features": { +// "ghcr.io/devcontainers-community/features/bazel:1": {} +// }, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + "settings": {}, + "extensions": [ + "ms-vscode.cpptools-extension-pack" + ] + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [3000], + + // Use 'portsAttributes' to set default properties for specific forwarded ports. + // More info: https://containers.dev/implementors/json_reference/#port-attributes + + // Use 'postCreateCommand' to run commands after the container is created. + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From 7600ee32898110fcd93e5e23cb601d3a8489f23a Mon Sep 17 00:00:00 2001 From: Kalen Brunham Date: Sun, 24 Dec 2023 01:02:37 +0000 Subject: [PATCH 2/4] Updated comments --- .devcontainer/devcontainer.json | 72 +++++++++++++-------------------- 1 file changed, 29 insertions(+), 43 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f60b31c4a..edf81d2ec 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,44 +3,40 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node { "name": "Verible Dev", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - // "image": "amr-registry.caas.intel.com/fpga-simics/devenv/ubuntu22-dev:1.0", - //"image": "mcr.microsoft.com/devcontainers/base:jammy", - //"image": "mcr.microsoft.com/devcontainers/universal:2-linux", "build": { "dockerfile": "Dockerfile", - "args" : { - "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", - "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", - "http_proxy": "http://proxy-dmz.intel.com:912/", - "https_proxy": "http://proxy-dmz.intel.com:912/" - } + // Add any proxy settings if the build of the + // container is behind a proxy + // + // "args" : { + // "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", + // "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", + // "http_proxy": "http://proxy-dmz.intel.com:912/", + // "https_proxy": "http://proxy-dmz.intel.com:912/" + // } }, +// Add any proxy settings if connecting to a container on +// a remote machine +// +// "remoteEnv": { +// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", +// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", +// "http_proxy": "http://proxy-dmz.intel.com:912/", +// "https_proxy": "http://proxy-dmz.intel.com:912/", +// }, + +// Add any proxy settings if the container is behind +// a proxy +/// +// "containerEnv": { +// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", +// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", +// "http_proxy": "http://proxy-dmz.intel.com:912/", +// "https_proxy": "http://proxy-dmz.intel.com:912/" +// }, - "remoteEnv": { - "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", - "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", - "http_proxy": "http://proxy-dmz.intel.com:912/", - "https_proxy": "http://proxy-dmz.intel.com:912/", - "npm_config_proxy": "http://proxy-dmz.intel.com:912/", - "npm_config_https_proxy": "http://proxy-dmz.intel.com:912/" - }, - - - "containerEnv": { - "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", - "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", - "http_proxy": "http://proxy-dmz.intel.com:912/", - "https_proxy": "http://proxy-dmz.intel.com:912/" - }, - - // Features to add to the dev container. More info: https://containers.dev/features. - // devcontainer.json -// "features": { -// "ghcr.io/devcontainers-community/features/bazel:1": {} -// }, // Configure tool-specific properties. "customizations": { @@ -51,16 +47,6 @@ "ms-vscode.cpptools-extension-pack" ] } - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [3000], - - // Use 'portsAttributes' to set default properties for specific forwarded ports. - // More info: https://containers.dev/implementors/json_reference/#port-attributes - - // Use 'postCreateCommand' to run commands after the container is created. + } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" } From f608a59a4e8b9c959e8a345176cf2ff2ac924144 Mon Sep 17 00:00:00 2001 From: Kalen Brunham Date: Sun, 24 Dec 2023 01:07:25 +0000 Subject: [PATCH 3/4] Fixed formatting --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 42 +++++++++++++++------------------ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c1136fc79..bc36844a6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -# Available versions: https://github.com/devcontainers/images/tree/main/src/ruby +# Available versions: https://github.com/devcontainers/images/tree/main/src/cpp FROM mcr.microsoft.com/devcontainers/cpp:ubuntu-22.04 RUN apt update && apt install -y clang-format clang-tidy RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel && chmod a+rx /usr/local/bin/bazel && /usr/local/bin/bazel --version diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index edf81d2ec..98378e9b1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,9 @@ - // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node { "name": "Verible Dev", - "build": { - "dockerfile": "Dockerfile", + "dockerfile": "Dockerfile", // Add any proxy settings if the build of the // container is behind a proxy // @@ -17,26 +15,25 @@ // } }, -// Add any proxy settings if connecting to a container on -// a remote machine -// -// "remoteEnv": { -// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", -// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", -// "http_proxy": "http://proxy-dmz.intel.com:912/", -// "https_proxy": "http://proxy-dmz.intel.com:912/", -// }, - -// Add any proxy settings if the container is behind -// a proxy -/// -// "containerEnv": { -// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", -// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", -// "http_proxy": "http://proxy-dmz.intel.com:912/", -// "https_proxy": "http://proxy-dmz.intel.com:912/" -// }, + // Add any proxy settings if connecting to a container on + // a remote machine + // + // "remoteEnv": { + // "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", + // "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", + // "http_proxy": "http://proxy-dmz.intel.com:912/", + // "https_proxy": "http://proxy-dmz.intel.com:912/", + // }, + // Add any proxy settings if the container is behind + // a proxy + /// + // "containerEnv": { + // "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", + // "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", + // "http_proxy": "http://proxy-dmz.intel.com:912/", + // "https_proxy": "http://proxy-dmz.intel.com:912/" + // }, // Configure tool-specific properties. "customizations": { @@ -48,5 +45,4 @@ ] } } - } From d9fd2a6061bd210960784f80f9c109d83868509e Mon Sep 17 00:00:00 2001 From: Kalen Brunham Date: Sat, 13 Jan 2024 21:38:09 +0000 Subject: [PATCH 4/4] Moved comments based on code review feedback. --- .devcontainer/devcontainer.json | 40 +++++++++------------------------ 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 98378e9b1..54aad83a9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,40 +1,22 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node + +// If you are behind a proxy, set the http_proxy and https_proxy environment variables +// in the container environment. For example: +/// +// "containerEnv": { +// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", +// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", +// "http_proxy": "http://proxy-dmz.intel.com:912/", +// "https_proxy": "http://proxy-dmz.intel.com:912/" +// }, + { "name": "Verible Dev", "build": { "dockerfile": "Dockerfile", - // Add any proxy settings if the build of the - // container is behind a proxy - // - // "args" : { - // "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", - // "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", - // "http_proxy": "http://proxy-dmz.intel.com:912/", - // "https_proxy": "http://proxy-dmz.intel.com:912/" - // } }, - // Add any proxy settings if connecting to a container on - // a remote machine - // - // "remoteEnv": { - // "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", - // "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", - // "http_proxy": "http://proxy-dmz.intel.com:912/", - // "https_proxy": "http://proxy-dmz.intel.com:912/", - // }, - - // Add any proxy settings if the container is behind - // a proxy - /// - // "containerEnv": { - // "HTTP_PROXY": "http://proxy-dmz.intel.com:912/", - // "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/", - // "http_proxy": "http://proxy-dmz.intel.com:912/", - // "https_proxy": "http://proxy-dmz.intel.com:912/" - // }, - // Configure tool-specific properties. "customizations": { // Configure properties specific to VS Code.