This repo bootstraps new or existing projects with development containers. This is initially targeted towards a Python and AWS stack development with Visual Studio code (all be it other editors such as PyCharm support dev containers).
This guide assumes that Visual Studio Code is being used.
- Open a directory you want to work in (can be new or existing)
- Copy the devcontainer directory to this location renaming in to .devcontainer
- Ensure the . has actually been added to the devcontainer copy resulting in
.devcontainer
- Open the directory in Visual Studio Code (the application expects it in root of the directory tree)
- Install the dev container extension if not already
- Opt to open the directory in a remote session as demoed in the extension marketplace page.
component | descriptions |
---|---|
devcontainer.json | VS Code dev container configuration file |
docker-compose.yml | docker environment configuration (enables the use of multiple images) |
Dockerfile | dev environment definition |
stores | persists dev container configuration |
tools | description |
---|---|
Docker | installed on the host OS enabling development containers alongside container development |
Visual Studio Code | editor that support developer containers (my prefered editor but others like pycharm support) |
Python | software development language |
Terraform | IaC language for infrastructure development |
Git | source control managemer (scm) |
make | build tool |
postgres (client) | local db development compatible with AWS Redshift |
awscli (v2) | commandline interface tool for AWS |
awscli-local | commandline interface tool for Localstack |
cfn-nag | AWS CloudFormation linting tool |
Bash | not the default shell but a dependency to other tools |
These tools are not baked into the development container but are setup using a docker-compose configuration pulling dedicated official images.
Tools | description |
---|---|
Postgres | database engine |
Localstack | AWS simulator |
When making custom changes to the development environment either adjust the image reference within the docker-compose.yml file. Alternatively move the the Dockerfile within the devcontainer directory and update the docker-compose.yml to use a Dockerfile reference.
# | item | description |
---|---|---|
0 | non-root user | improve security posture with a non-roo docker user. |