Skip to content

Development container setup for Visual Studio Code

Notifications You must be signed in to change notification settings

Joncpaske/localenv

Repository files navigation

Local Env

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).

How to use

This guide assumes that Visual Studio Code is being used.

  1. Open a directory you want to work in (can be new or existing)
  2. Copy the devcontainer directory to this location renaming in to .devcontainer
  3. Ensure the . has actually been added to the devcontainer copy resulting in .devcontainer
  4. Open the directory in Visual Studio Code (the application expects it in root of the directory tree)
  5. Install the dev container extension if not already
  6. Opt to open the directory in a remote session as demoed in the extension marketplace page.

Initial Configuration

Components

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

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

Additional 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

Adjusting the development environment

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.

Roadmap

# item description
0 non-root user improve security posture with a non-roo docker user.

About

Development container setup for Visual Studio Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published