Skip to content

Commit e9670c8

Browse files
authored
fix(tooling): container user's uid does not match host's uid (#20082)
Docker `jsii/superchain` image, which is used as a base image of devcontainer, has a default non-root user `superchain` which UID is `1001`. If the container host's workspace directory is not owned by UID `1001`, users may not be able to modify files inside the container because of the insufficient permission. .devcontainer.json has a workaround option [`updateRemoteUserUID`](https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_general-devcontainerjson-properties) which updates container's non-root user's UID at runtime. This PR sets `remoteUser` explicitly in .devcontainer.json to make `updateRemoteUserUID` work. fixes #19979 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 9f787a3 commit e9670c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"postCreateCommand": "yarn build --skip-test --no-bail --skip-prereqs --skip-compat",
55
"extensions": [
66
7-
]
7+
],
8+
"remoteUser": "superchain"
89
}

0 commit comments

Comments
 (0)