Sign inSign up

comanderanch/my-dind-nginx

By comanderanch

Updated over 1 year ago

Image
0

132

comanderanch/my-dind-nginx repository overview

My DinD Nginx Project

Overview

The comanderanch/my-dind-nginx Docker image offers a comprehensive development environment with Docker-in-Docker (DinD) capabilities and an integrated Nginx server. This setup is ideal for CI/CD pipelines, testing, and development scenarios where nested Docker environments and web server capabilities 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.
  • Nginx Server: Integrated Nginx server for serving web content and applications.
  • 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 Nginx Project, run the following command in your terminal:

docker pull comanderanch/my-dind-nginx
Running the Container

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

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

This will start the DinD container with the Nginx server and map port 80 for Nginx and port 2375 for Docker daemon to your host machine. You can then access the Nginx server by navigating to http://localhost in your web browser.

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-nginx-service:
    image: comanderanch/my-dind-nginx
    privileged: true
    ports:
      - "80:80"
      - "2375:2375"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./projects:/root/projects

Tag summary

Content type

Image

Digest

sha256:0267386a9

Size

187.5 MB

Last updated

over 1 year ago

docker pull comanderanch/my-dind-nginx