Sign inSign up

comanderanch/my-dind

By comanderanch

Updated over 1 year ago

Image
0

130

comanderanch/my-dind repository overview

My DinD Project

Overview

The comanderanch/my-dind Docker image provides a comprehensive development environment that integrates Docker-in-Docker (DinD) capabilities. This setup allows you to run Docker inside a Docker container, making it ideal for CI/CD pipelines, testing, and development scenarios where nested Docker environments are required. Since this build, updates have been applied to include scripts that automate the creation and startup of Docker Compose files, and a C++ generator to automatically generate Compose files at boot.

Features

  • Docker-in-Docker (DinD) Integration: Run and manage Docker containers from within the container itself.
  • Automated Docker Compose: Includes scripts to automatically generate and start Docker Compose files at boot.
  • Containerized Development: Provides a fully containerized development environment, ensuring consistency and isolation.
  • Flexible Configuration: Easily configurable to suit various development and testing needs.
  • CI/CD Pipeline Ready: Ideal for integrating into CI/CD pipelines to streamline the build, test, and deployment processes.
  • Cross-Platform: Ensures that your environment can run consistently on any platform that supports Docker.

Getting Started

Prerequisites
Installation

To pull the Docker image for My DinD Project, run the following command in your terminal:

docker pull comanderanch/my-dind
Running the Container

To run the container with DinD enabled, use the following command:

docker run -it --privileged -p 2375:2375 comanderanch/my-dind

This will start the DinD container and map port 2375 of the container to port 2375 on your host machine. You can then interact with the Docker daemon running inside the container.

Automated Docker Compose

The container includes a script that automatically generates and starts Docker Compose files at boot using a C++ generator. This ensures that your multi-container applications are up and running without manual intervention.

Usage

Once the container is running, you can use Docker commands from within the container to manage other containers. This is useful for scenarios where you need a nested Docker environment.

For example, to run another Docker container from within the DinD container, you can use:

docker run -it alpine
Running Docker Compose

You can also use Docker Compose to manage multi-container applications. Here is an example of a docker-compose.yml file:

version: '3.8'

services:
  my-dind-service:
    image: comanderanch/my-dind
    privileged: true
    ports:
      - "2375:2375"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./projects:/root/projects

Tag summary

Content type

Image

Digest

sha256:e9edb5ff6

Size

289.4 MB

Last updated

over 1 year ago

docker pull comanderanch/my-dind