Skip to content

AWS Cloud Development Kit (AWS CDK) Python Docker Container

Notifications You must be signed in to change notification settings

gliptak/aws-cdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Cloud Development Kit (AWS CDK) Python Docker Container

Build Docker image Docker Image Version (latest semver)

Docker containers

https://hub.docker.com/r/gliptak/aws-cdk-python

https://github.com/users/gliptak/packages/container/package/aws-cdk-python

Usage

Run single (cdk) command on mounted project

docker run -v ~/.aws:/home/cdk/.aws -v $(pwd):/app --rm -it gliptak/aws-cdk-python:latest /bin/sh -c "/usr/bin/cdk version"

Following https://docs.aws.amazon.com/cdk/latest/guide/hello_world.html

docker run -v ~/.aws:/home/cdk/.aws -v $(pwd):/app --rm -it gliptak/aws-cdk-python:latest

Run commands in container

cdk init app --language python
source .venv/bin/activate
python -m pip install -r requirements.txt
cdk ls
cdk synth
export AWS_PROFILE=myprofile

cdk bootstrap

cdk deploy
cdk diff
cdk destroy

Override UID/GID

Tailor example configuration docker-compose.yml and .env. Note the --build flag

docker-compose up -d --build
docker-compose exec cdk cdk version
docker-compose exec cdk sh
docker-compose down

Notes

https://jtreminio.com/blog/running-docker-containers-as-current-host-user/

https://medium.com/redbubble/running-a-docker-container-as-a-non-root-user-7d2e00f8ee15

moby/moby#34129

https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact

https://docs.aws.amazon.com/cdk/latest/guide/tagging.html

https://docs.github.com/en/actions/guides/publishing-docker-images

https://github.com/opencontainers/image-spec/blob/master/annotations.md

https://github.com/marketplace/actions/publish-docker-image

About

AWS Cloud Development Kit (AWS CDK) Python Docker Container

Topics

Resources

Stars

Watchers

Forks