From 03200d58a83294f43ef51548b8b33fd97725607c Mon Sep 17 00:00:00 2001 From: Amir Szekely Date: Wed, 29 Dec 2021 18:11:15 -0800 Subject: [PATCH 1/3] feat: add configuration for Visual Studio Code --- .devcontainer.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .devcontainer.json diff --git a/.devcontainer.json b/.devcontainer.json new file mode 100644 index 0000000000..47c60cf9b7 --- /dev/null +++ b/.devcontainer.json @@ -0,0 +1,8 @@ +{ + "name": "Dev Container Definition - AWS JSII", + "image": "jsii/superchain:1-buster-slim", + "postCreateCommand": "yarn install && yarn build", + "extensions": [ + "dbaeumer.vscode-eslint@2.1.5" + ] +} From f3416e6606d6324110d3e99c70ff9b2bdd358d66 Mon Sep 17 00:00:00 2001 From: Amir Szekely Date: Wed, 12 Jan 2022 11:49:33 -0800 Subject: [PATCH 2/3] Build latest superchain instead of using prebuilt image This will assure we get the right image for the branch. Also build faster by ignoring temporary files like python venv and node_modules that the build itself creates. --- .devcontainer.json | 13 ++++++++++++- .dockerignore | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.devcontainer.json b/.devcontainer.json index 47c60cf9b7..8739980c4e 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -1,6 +1,17 @@ { "name": "Dev Container Definition - AWS JSII", - "image": "jsii/superchain:1-buster-slim", + "build": { + "dockerfile": "superchain/Dockerfile", + "context": ".", + "target": "superchain", + "args": { + "BUILDPLATFORM": "linux/amd64", + "TARGETPLATFORM": "linux/amd64", + "BUILD_TIMESTAMP": "unknown", + "REGISTRY": "docker.io/library", + "COMMIT_ID": "head" + } + }, "postCreateCommand": "yarn install && yarn build", "extensions": [ "dbaeumer.vscode-eslint@2.1.5" diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..f53c86acbe --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +.env +maven-repo From e22f115f5d480a236cc482a507d2ca5169166378 Mon Sep 17 00:00:00 2001 From: Amir Szekely Date: Wed, 12 Jan 2022 12:51:21 -0800 Subject: [PATCH 3/3] Run as root and avoid: error An unexpected error occurred: "EPERM: operation not permitted, chmod '/workspaces/jsii/packages/@jsii/dotnet-runtime/node_modules/.bin/jsii-runtime'". --- .devcontainer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer.json b/.devcontainer.json index 8739980c4e..96182dcfe2 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -12,6 +12,8 @@ "COMMIT_ID": "head" } }, + "containerUser": "root", + "remoteUser": "root", "postCreateCommand": "yarn install && yarn build", "extensions": [ "dbaeumer.vscode-eslint@2.1.5"