From c5ba123a59e98414496c7af7fea04242a7bcf47a Mon Sep 17 00:00:00 2001 From: Francesco Giacomini <francesco.giacomini@cnaf.infn.it> Date: Thu, 11 Nov 2021 15:58:34 +0000 Subject: [PATCH] Add devcontainer support --- .devcontainer/Dockerfile | 8 ++++++++ .devcontainer/devcontainer.json | 28 ++++++++++++++++++++++++++++ 2 files changed, 36 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 0000000..1c5316c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +FROM storm2/ngx-voms-build + +USER root + +RUN yum install -y https://repo.ius.io/ius-release-el7.rpm centos-release-scl \ + && yum install -y git224 devtoolset-10 + +USER $BUILD_USER diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..821c8c5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.159.0/containers/cpp +{ + "name": "C++", + "build": { + "dockerfile": "Dockerfile", + }, + "runArgs": [ + "--cap-add=SYS_PTRACE", + "--security-opt", + "seccomp=unconfined" + ], + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-vscode.cpptools", + ], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + //"postCreateCommand": "sudo debuginfo-install -y voms", + // Comment out this line to run as root instead. + "remoteUser": "build", + "remoteEnv": {"NGX_HTTP_VOMS_MODULE_ROOT": "${containerWorkspaceFolder}"} +} \ No newline at end of file -- GitLab