From 579aadd33b83287e8141e28e962869994ca0b9c8 Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Sat, 25 Sep 2021 18:06:27 +0000 Subject: [PATCH 1/2] support common ports, add chrome headless for testing --- .devcontainer/Dockerfile | 11 +++++++++++ .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ .devcontainer/postCreate.sh | 6 ++++++ 3 files changed, 42 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/postCreate.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000000..1f62fd5bf46 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +ARG VARIANT="16" +FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - +RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list +RUN apt update +RUN apt install -y google-chrome-stable xvfb diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..a06f03e5d3e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/main/containers/javascript-node +{ + "name": "Ubuntu", + + "build": { + "dockerfile": "Dockerfile", + "args": { "VARIANT": "12" } + }, + + "postCreateCommand": "bash .devcontainer/postCreate.sh", + + // 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": [], + + // 9999 is web server, 9876 is karma + "forwardPorts": [9876, 9999], + + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "node" +} diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh new file mode 100644 index 00000000000..7e14a2d200d --- /dev/null +++ b/.devcontainer/postCreate.sh @@ -0,0 +1,6 @@ +echo "Post Create Starting" + +nvm install +nvm use +npm install gulp-cli -g +npm ci From e0480503f681b108a1115e7f39317f976246b261 Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Sat, 25 Sep 2021 18:22:37 +0000 Subject: [PATCH 2/2] change Dockefile variant to match passed in variant initially --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1f62fd5bf46..cfb29ebdfa9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -ARG VARIANT="16" +ARG VARIANT="12" FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} # [Optional] Uncomment this section to install additional OS packages. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a06f03e5d3e..0176b8317b3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,9 @@ // Add the IDs of extensions you want installed when the container is created. - "extensions": [], + "extensions": [ + "nickdodd79.gulptasks" + ], // 9999 is web server, 9876 is karma "forwardPorts": [9876, 9999],