-
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(cdk): add Dockerfile for toolkit container (#1569)
Fixes #1302.
- Loading branch information
1 parent
d8207e3
commit f997fd2
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
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,2 @@ | ||
.dockerignore | ||
Dockerfile |
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 |
---|---|---|
|
@@ -198,6 +198,29 @@ If you also wish to package to all languages, make sure you have all the [toolch | |
$ ./pack.sh | ||
``` | ||
|
||
### Full Docker build | ||
|
||
Clone the repo: | ||
|
||
```console | ||
$ git clone [email protected]/awslabs/aws-cdk | ||
$ cd aws-cdk | ||
``` | ||
|
||
If you already have a local repo and you want a fresh build, run `git clean -fdx` from the root. | ||
|
||
Build the docker image: | ||
|
||
```console | ||
$ docker build -t aws-cdk . | ||
``` | ||
|
||
This allows you to run the CDK in a CDK-compatible directory with a command like: | ||
|
||
```console | ||
$ docker run -v $(pwd):/app -w /app aws-cdk <CDK ARGS> | ||
``` | ||
|
||
### Partial build | ||
|
||
In many cases, you don't really need to build the entire project. Say you want to work on the `@aws-cdk/aws-ec2` module: | ||
|
@@ -268,7 +291,7 @@ $ BUILD_DOCS_DEV=1 ./build-docs.sh | |
### Tooling Assists | ||
#### Jetbrains (WebStorm/IntelliJ) | ||
This project uses lerna and utilizes symlinks inside nested node_modules directories. You may encounter an issue during | ||
indexing where the IDE attempts to index these directories and keeps following links until the process runs out of | ||
indexing where the IDE attempts to index these directories and keeps following links until the process runs out of | ||
available memory and crashes. To fix this, you can run ```node ./scripts/jetbrains-remove-node-modules.js``` to exclude | ||
these directories. | ||
|
||
|
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,20 @@ | ||
FROM node:8.15-alpine | ||
|
||
WORKDIR /app | ||
|
||
RUN apk add --update \ | ||
bash \ | ||
git \ | ||
rsync \ | ||
zip \ | ||
python3 \ | ||
python3-dev \ | ||
py3-setuptools \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
COPY . . | ||
|
||
RUN ./build.sh \ | ||
&& ./link-all.sh | ||
|
||
ENTRYPOINT ["/app/node_modules/.bin/cdk"] |