From 417b5650322149cf2142bfcf1d2e678d24e549e0 Mon Sep 17 00:00:00 2001 From: Hugo Bernier Date: Sat, 12 Oct 2024 16:03:20 -0400 Subject: [PATCH] Updated container --- .../.devcontainer/devcontainer.json | 75 +++++++++---------- .../.devcontainer/spfx-startup.sh | 6 +- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/samples/react-tree-orgchart/.devcontainer/devcontainer.json b/samples/react-tree-orgchart/.devcontainer/devcontainer.json index edbc0aded9..43357099ed 100644 --- a/samples/react-tree-orgchart/.devcontainer/devcontainer.json +++ b/samples/react-tree-orgchart/.devcontainer/devcontainer.json @@ -1,39 +1,38 @@ -// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer { - "name": "SPFx 1.10.0", - "image": "docker.io/m365pnp/spfx:1.10.0", - // 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": [ - "editorconfig.editorconfig", - "dbaeumer.vscode-eslint" - ], - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [ - 4321, - 35729, - 5432 - ], - "portsAttributes": { - "4321": { - "protocol": "https", - "label": "Manifest", - "onAutoForward": "silent", - "requireLocalPort": true - }, - "5432": { - "protocol": "https", - "label": "Workbench", - "onAutoForward": "silent" - }, - "35729": { - "protocol": "https", - "label": "LiveReload", - "onAutoForward": "silent", - "requireLocalPort": true - } - }, - "postCreateCommand": "bash .devcontainer/spfx-startup.sh", - "remoteUser": "node" -} \ No newline at end of file + "name": "SPFx 1.20.0", + "image": "docker.io/m365pnp/spfx:1.20.0", + "customizations": { + "vscode": { + "extensions": [ + "editorconfig.editorconfig", + "dbaeumer.vscode-eslint" + ] + } + }, + "forwardPorts": [ + 4321, + 35729, + 5432 + ], + "portsAttributes": { + "4321": { + "protocol": "https", + "label": "Manifest", + "onAutoForward": "silent", + "requireLocalPort": true + }, + "5432": { + "protocol": "https", + "label": "Workbench", + "onAutoForward": "silent" + }, + "35729": { + "protocol": "https", + "label": "LiveReload", + "onAutoForward": "silent", + "requireLocalPort": true + } + }, + "postCreateCommand": "bash .devcontainer/spfx-startup.sh", + "remoteUser": "node" +} diff --git a/samples/react-tree-orgchart/.devcontainer/spfx-startup.sh b/samples/react-tree-orgchart/.devcontainer/spfx-startup.sh index ca531bdf2d..456d6aea8b 100644 --- a/samples/react-tree-orgchart/.devcontainer/spfx-startup.sh +++ b/samples/react-tree-orgchart/.devcontainer/spfx-startup.sh @@ -7,9 +7,11 @@ echo echo -e "\e[1;94mGenerating dev certificate\e[0m" gulp trust-dev-cert +# Convert the generated PEM certificate to a CER certificate +openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer -cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.cer -cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.pem +# Copy the PEM ecrtificate for non-Windows hosts +cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem ## add *.cer to .gitignore to prevent certificates from being saved in repo if ! grep -Fxq '*.cer' ./.gitignore