Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 1.79 KB

README.md

File metadata and controls

96 lines (61 loc) · 1.79 KB

Development containers

Docker development containers with my profile configuration.

Features

  • ./devcontainer script for Docker commands automation
  • Debian slim images
  • Rootless containers
  • Zsh shell

Usage

./devcontainer --help

Container networking

Find container IP address:

./devcontainer network inspect bridge | jq '.[].Containers'

Environments

Every environment is based on base image. The base image must be built prior to building any other environment:

./devcontainer build

Build a specific environment image:

./devcontainer --env <environment_id> build

Run environment container:

./devcontainer --env <environment_id> run

Example:

./devcontainer --env python build --no-cache
./devcontainer --env python run --rm

Base

Environment id: base

To update system packages in existing base image, use Docker --no-cache flag:

./devcontainer build --no-cache

You must rebuild environment images and create new containers as well.

Node.js

Environment id: nodejs

Features:

Python

Environment id: python

Features:

Go

Environment id: go

Features:

Troubleshooting

Apple M1 MacBook

If you encounter issues with missing libraries, add --platform linux/x86_64 flag after native Docker commands:

$ ./devcontainer --env <environment> build --platform linux/x86_64
$ ./devcontainer --env <environment> run --platform linux/x86_64