-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: support for Docker in VS Code devcontainer (#21909)
The current devcontainer configuration doesn't support docker commands. More details in this Slack Thread: https://cdk-dev.slack.com/archives/C018XT6REKT/p1661980670194059 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
4 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM jsii/superchain:1-buster-slim | ||
|
||
USER root | ||
|
||
# Change uid/guid of superchain so it can work with the docker-in-docker feature | ||
RUN groupmod --gid 1000 superchain \ | ||
&& usermod --uid 1000 --gid 1000 superchain \ | ||
&& chown -R 1000:1000 /home/superchain | ||
|
||
USER superchain | ||
|
||
# Setup oh-my-zsh | ||
RUN sudo apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& sudo apt-get -y install --no-install-recommends zsh vim \ | ||
&& sudo rm -rf /var/lib/apt/lists/* \ | ||
&& sudo chsh -s $(which zsh) $(whoami) | ||
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended \ | ||
# Required, otherwise shell is extermly slow due the size of the aws-cdk | ||
&& sudo sh -c 'echo "[oh-my-zsh]\n hide-dirty = 1" > /etc/gitconfig' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "aws-cdk", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
"customizations": { | ||
"vscode": { | ||
"extensions": ["dbaeumer.vscode-eslint"] | ||
} | ||
}, | ||
|
||
"postCreateCommand": "yarn install", | ||
"remoteUser": "superchain", | ||
"features": { | ||
"docker-in-docker": { | ||
"version": "latest", | ||
"moby": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters