This repository provides pre-configured Docker Compose setups for various essential services, including Apache, GoSpeed, MySQL with MariaDB and phpMyAdmin, MongoDB, Nginx, Pi-hole, Portainer, PostgreSQL, Prometheus and Grafana, and more.
- Installing Docker and Docker Compose
- Post-Installation Steps
- Repository Structure
- Setup Overviews
- Usage Instructions
- Dependency Management with Renovate
- Contributing & Support
- License
- Download Docker Desktop from Docker.
- Run the Installer and follow the instructions.
- Verify Installation:
docker --version # Check the installed Docker version docker-compose --version # Check the installed Docker Compose version
- Download Docker Desktop from Docker.
- Open the
.dmg
file and drag Docker to Applications. - Verify Installation:
docker --version # Check the installed Docker version docker-compose --version # Check the installed Docker Compose version
- Remove Old Versions:
sudo apt remove docker docker-engine docker.io containerd runc # Clean up old installations
- Install Required Packages:
sudo apt update # Update package list sudo apt install apt-transport-https ca-certificates curl software-properties-common # Install prerequisites
- Add Docker’s GPG Key and Repository:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - # Add Docker’s GPG key sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # Add Docker repository
- Install Docker and Docker Compose:
sudo apt update # Update package list again sudo apt install docker-ce docker-compose # Install Docker and Docker Compose
- Remove Old Versions:
sudo yum remove docker docker-common docker-selinux docker-engine # Clean up old installations
- Set up the Stable Repository:
sudo yum install -y yum-utils # Install required utilities sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # Add Docker repository
- Install Docker:
sudo yum install docker-ce # Install Docker sudo systemctl start docker # Start Docker service sudo systemctl enable docker # Enable Docker to start on boot
- Install Docker Compose:
sudo yum install docker-compose # Install Docker Compose via package manager
- Remove Old Versions:
sudo zypper rm docker docker-engine docker-selinux # Clean up old installations
- Install Docker:
sudo zypper install docker # Install Docker
- Start Docker:
sudo systemctl start docker # Start Docker service sudo systemctl enable docker # Enable Docker to start on boot
- Install Docker Compose:
sudo zypper install docker-compose # Install Docker Compose via package manager
For installation on other distributions (Debian, Fedora, Arch Linux, etc.), please refer to the official Docker documentation.
-
Manage Docker as a Non-Root User:
sudo usermod -aG docker $USER # Add current user to the Docker group for non-root access
Log out and back in for changes to take effect.
-
Verify Docker Installation:
docker run hello-world # Run a test container to verify installation
-
Configure Docker to Start on Boot:
sudo systemctl enable docker # Set Docker to start automatically on boot
-
Check Docker Service Status:
sudo systemctl status docker # Check if Docker service is running
-
Explore Docker Commands:
docker --help # Display available Docker commands docker ps # List running containers docker ps -a # List all containers, including stopped ones
-
Security Practices: Review Docker security best practices to protect your environment.
-
Regular Maintenance: Keep Docker updated with your package manager to ensure you have the latest features and security patches.
This repository is organized as follows:
.
├── apache-docker
│ └── docker-compose.yml
├── docs
│ ├── apache-docker
│ ├── gospeed-docker
│ ├── mongo-docker
│ ├── mysql-mariadb-phpmyadmin-docker
│ ├── nginx-docker
│ ├── pihole-docker
│ ├── portainer-docker
│ ├── postgresql-docker
│ ├── prometheus-grafana-docker
│ └── renovate-documentation.md
├── generate_docs.py
├── gospeed-docker
│ └── docker-compose.yml
├── LICENSE
├── mongo-docker
│ └── docker-compose.yml
├── mysql-mariadb-phpmyadmin-docker
│ ├── docker-compose.yml
│ ├── mariadb_data
│ └── mysql_data
├── nginx-docker
│ └── docker-compose.yml
├── openproject
│ └── docker-compose.yaml
├── pihole-docker
│ ├── docker-compose.yml
│ ├── etc-dnsmasq.d
│ └── etc-pihole
├── portainer-docker
│ └── docker-compose.yml
├── postgresql-docker
│ ├── docker-compose.yml
│ └── postgres-data
├── prometheus-grafana-docker
│ ├── docker-compose.yml
│ └── prometheus
├── README.md
├── renovate.json
└── valkey-docker
├── docker-compose.yml
└── valkey.conf
Directory: apache-docker/
- Deploy an Apache web server.
- Access the web server at
http://localhost:80
(or the port specified indocker-compose.yml
).
Directory: gospeed-docker/
- Deploy GoSpeed, a high-speed downloader developed with Golang and Flutter.
- Supports HTTP, BitTorrent, and Magnet protocols.
- Access UI at
http://localhost:9999
.
Directory: mongo-docker/
- Set up a MongoDB database.
- Access MongoDB on port
27017
.
Directory: mysql-mariadb-phpmyadmin-docker/
- Set up MySQL and MariaDB with [phpMyAdmin][2].
- phpMyAdmin is a free software tool written in PHP to handle MySQL and MariaDB administration over the web.
- Access phpMyAdmin at
http://localhost:8080
.
Directory: nginx-docker/
- Deploy an Nginx web server.
- Access the web server at
http://localhost:80
(or the port specified indocker-compose.yml
).
Directory: pihole-docker/
- Deploy Pi-hole for ad blocking.
- Access web interface at
http://localhost
.
Directory: portainer-docker/
- Manage Docker containers using Portainer.
- Access Portainer at
http://localhost:9000
.
Directory: postgresql-docker/
- Set up a PostgreSQL database.
- Access PostgreSQL on port
5432
.
Directory: prometheus-grafana-docker/
- Monitor systems with Prometheus and Grafana.
- Access Prometheus at
http://localhost:7070
and Grafana athttp://localhost:7071
.
- Access Prometheus at
Directory: openproject/
- Deploy OpenProject, a project management tool.
- Access OpenProject at the specified port in
docker-compose.yml
.
Directory: valkey-docker/
- Deploy Valkey
- Access Valkey at the specified port in
docker-compose.yml
.
- Choose a Service Directory: Navigate to the desired service directory.
- Customize Configurations: Edit
docker-compose.yml
as needed to adjust ports, volumes, environment variables, etc. - Deploy the Service:
docker-compose up -d # Start services in detached mode
- Stop the Service:
docker-compose down # Stop and remove the containers
For those interested in understanding the structure of the docker-compose.yml
files, here is a brief overview:
- Version: Specifies the version of the Docker Compose file format.
version: '3'
- Services: Defines individual containers or services.
services: web: build: . ports: - "8080:8080" volumes: - .:/code
- Build: Specifies the location of the Dockerfile if you are building a custom image.
build: context: . dockerfile: ./docker/Dockerfile
- Image: Specifies a pre-built image to use.
image: mysql/mysql-server:5.8
- Environment: Sets environment variables for the container.
environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_USER=ashok - MYSQL_PASSWORD=waytoeasylearn - MYSQL_DATABASE=backend
- Volumes: Mounts volumes to persist data.
volumes: - "/home/ashok/docker/app/db/init.sql:/opt/app/init.sql"
- Networks: Defines custom networks for services to communicate over.
networks: my-network: driver: bridge
For more detailed information, refer to the [Docker Compose YAML documentation][5].
This repository uses Renovate to automatically update Docker images and dependencies. The configuration is defined in renovate.json
.
Contributions are welcome For suggestions or issues, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.