Docker Development Environment
This repository contains a Dockerfile for setting up a Docker development environment using Docker-in-Docker (DinD). It is designed to facilitate the building and management of Docker containers from within a devcontainer, providing a consistent and isolated development environment.
- Docker-in-Docker: Utilizes the Docker DinD image to enable Docker operations within the container.
- Reproducibility: All essential tools and packages are pinned by version to ensure that the environment is consistent and reproducible across different setups.
- Non-root User: Runs as a non-root user by default to enhance security.
- Health Checks: Includes a health check to ensure the Docker daemon is running correctly within the container.
- Docker installed on your host machine.
- Visual Studio Code with the Remote - Containers extension installed.
-
Clone this Repository
git clone https://github.com/kockums/docker-devcontainer.git cd docker-dev-environment
-
Reopen in Container
- Open the project in Visual Studio Code.
- VS Code may prompt you to reopen in a container. If not, press
F1
orCtrl+Shift+P
, type "Reopen in Container", and execute the command.
-
Start Building Docker Images
- Use standard Docker commands within the container to build, run, and manage your Docker images and containers.
You can customize the Docker development environment by modifying the Dockerfile
and devcontainer.json
:
- Update the versions in the Dockerfile using build arguments to test different tool versions.
- Modify
devcontainer.json
to change settings or add extensions as needed for your development workflow.
Contributions to this repository are welcome. Please fork the repository and submit a pull request with your changes.
Distributed under the MIT License. See LICENSE
for more information.