Describe the bug
When opening the project with VS Code's Remote - Containers extension, my /workspaces directory has permissions to UID 1000. However, the image's default non-root user (superchain) has UID 1001.
As result, postCrateCommand will fail, files cannot be edited and scripts cannot be executed (without sudo).
I was able to workaround that by explicitly configuring the non-root user:
{
"name": "Dev Container Definition - AWS CDK",
"image": "jsii/superchain:1-buster-slim",
"postCreateCommand": "yarn build --skip-test --no-bail --skip-prereqs --skip-compat",
"extensions": [
"dbaeumer.vscode-eslint@2.1.5"
],
"remoteUser": "superchain"
}
Expected Behavior
I expected .devcontainer.json to work out of the box.
Current Behavior
I had to make changes to .devcontainer.json.
Reproduction Steps
Open the project using VS Code's Remote - Containers and try to edit any file.
Possible Solution
Explicitly configure the superchain non-root user in .devcontainer.json.
Additional Information/Context
No response
CDK CLI Version
N/A
Framework Version
No response
Node.js Version
N/A
OS
Linux Fedora
Language
Typescript
Language Version
No response
Other information
No response
Describe the bug
When opening the project with VS Code's Remote - Containers extension, my
/workspacesdirectory has permissions to UID 1000. However, the image's default non-root user (superchain) has UID 1001.As result,
postCrateCommandwill fail, files cannot be edited and scripts cannot be executed (without sudo).I was able to workaround that by explicitly configuring the non-root user:
{ "name": "Dev Container Definition - AWS CDK", "image": "jsii/superchain:1-buster-slim", "postCreateCommand": "yarn build --skip-test --no-bail --skip-prereqs --skip-compat", "extensions": [ "dbaeumer.vscode-eslint@2.1.5" ], "remoteUser": "superchain" }Expected Behavior
I expected
.devcontainer.jsonto work out of the box.Current Behavior
I had to make changes to
.devcontainer.json.Reproduction Steps
Open the project using VS Code's Remote - Containers and try to edit any file.
Possible Solution
Explicitly configure the
superchainnon-root user in.devcontainer.json.Additional Information/Context
No response
CDK CLI Version
N/A
Framework Version
No response
Node.js Version
N/A
OS
Linux Fedora
Language
Typescript
Language Version
No response
Other information
No response