Top Related Projects
:whale: A curated list of Docker resources and projects
Define and run multi-container applications with Docker
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.
Quick Overview
Docker's awesome-compose repository is a curated collection of Docker Compose sample applications. It provides a variety of example projects that demonstrate how to use Docker Compose to set up and run multi-container applications. This repository serves as a valuable resource for developers looking to learn or implement Docker Compose in their projects.
Pros
- Offers a wide range of sample applications covering various technologies and stacks
- Provides real-world examples of Docker Compose usage, making it easier to understand and implement
- Regularly updated with new examples and improvements
- Well-documented with clear instructions for each sample application
Cons
- Some examples may become outdated if not maintained regularly
- Might not cover every possible use case or technology combination
- Requires basic knowledge of Docker and Docker Compose to fully utilize
- Some examples may be too simplistic for complex production environments
Getting Started
To get started with the awesome-compose repository:
-
Clone the repository:
git clone https://github.com/docker/awesome-compose.git
-
Navigate to the desired sample application directory:
cd awesome-compose/[sample-app-directory]
-
Run the Docker Compose command to start the application:
docker-compose up -d
-
Access the application as specified in the sample's README file.
Note: Make sure you have Docker and Docker Compose installed on your system before running the samples.
Competitor Comparisons
:whale: A curated list of Docker resources and projects
Pros of awesome-docker
- Broader scope, covering various Docker-related topics beyond just compose files
- Larger community with more contributors and stars (>24k stars)
- Includes links to articles, tutorials, and tools in addition to code examples
Cons of awesome-docker
- Less focused on practical, ready-to-use Docker Compose examples
- May be overwhelming for beginners due to the vast amount of information
- Less frequently updated compared to awesome-compose
Code Comparison
awesome-docker example (Docker command):
docker run -d -p 80:80 nginx
awesome-compose example (Docker Compose file):
version: '3'
services:
web:
image: nginx
ports:
- "80:80"
Summary
awesome-docker is a comprehensive resource for Docker-related information, including tools, articles, and examples. It covers a wide range of topics but may be overwhelming for beginners. awesome-compose, on the other hand, focuses specifically on Docker Compose examples, making it more practical for users looking for ready-to-use configurations. While awesome-docker has a larger community and more stars, awesome-compose is updated more frequently and provides a more focused approach to learning and implementing Docker Compose.
Define and run multi-container applications with Docker
Pros of compose
- Official Docker tool for defining and running multi-container applications
- Provides a robust CLI for managing Docker environments
- Supports complex configurations with networks, volumes, and dependencies
Cons of compose
- Focused on functionality rather than example configurations
- Less beginner-friendly for those seeking ready-to-use templates
- Requires more setup and configuration knowledge
Code comparison
compose:
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
awesome-compose:
services:
frontend:
image: awesome-compose-frontend
ports:
- 3000:3000
Key differences
- Purpose: compose is a tool for defining and running Docker applications, while awesome-compose is a collection of Docker Compose examples
- Target audience: compose caters to developers and DevOps professionals, awesome-compose targets beginners and those seeking quick reference
- Scope: compose offers a wide range of features and configurations, awesome-compose focuses on practical, pre-configured examples
- Maintenance: compose is actively maintained by Docker, awesome-compose is a community-driven project
- Learning curve: compose requires more in-depth knowledge, awesome-compose provides an easier entry point for Docker Compose usage
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.
Pros of labs
- More comprehensive and in-depth tutorials covering various Docker topics
- Includes hands-on labs and workshops for practical learning
- Covers advanced topics like security, networking, and orchestration
Cons of labs
- Less frequently updated compared to awesome-compose
- May contain outdated information or examples
- Requires more time investment to work through the content
Code comparison
labs:
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
awesome-compose:
services:
frontend:
build: frontend
ports:
- 3000:3000
backend:
build: backend
ports:
- 3001:3001
Summary
labs provides a more comprehensive learning experience with in-depth tutorials and hands-on labs, covering a wide range of Docker topics. However, it may contain outdated information and requires more time investment. awesome-compose offers a curated list of Docker Compose examples, which are more frequently updated and easier to implement quickly. The code comparison shows that labs tends to use simpler examples, while awesome-compose demonstrates more complex multi-service configurations.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Awesome Compose 
A curated list of Docker Compose samples.
These samples provide a starting point for how to integrate different services using a Compose file and to manage their deployment with Docker Compose.
Note The following samples are intended for use in local development environments such as project setups, tinkering with software stacks, etc. These samples must not be deployed in production environments.
Contents
- Samples of Docker Compose applications with multiple integrated services.
- Single service samples.
- Basic setups for different platforms (not production ready - useful for personal use).
Samples of Docker Compose applications with multiple integrated services
Icon indicates Sample is compatible with Docker+Wasm.
ASP.NET / MS-SQL
- Sample ASP.NET core application with MS SQL server database.Elasticsearch / Logstash / Kibana
- Sample Elasticsearch, Logstash, and Kibana stack.Go / NGINX / MySQL
- Sample Go application with an Nginx proxy and a MySQL database.Go / NGINX / PostgreSQL
- Sample Go application with an Nginx proxy and a PostgreSQL database.Java Spark / MySQL
- Sample Java application and a MySQL database.NGINX / ASP.NET / MySQL
- Sample Nginx reverse proxy with an C# backend using ASP.NET.NGINX / Flask / MongoDB
- Sample Python/Flask application with Nginx proxy and a Mongo database.NGINX / Flask / MySQL
- Sample Python/Flask application with an Nginx proxy and a MySQL database.NGINX / Node.js / Redis
- Sample Node.js application with Nginx proxy and a Redis database.NGINX / Go
- Sample Nginx proxy with a Go backend.NGINX / WSGI / Flask
- Sample Nginx reverse proxy with a Flask backend using WSGI.PostgreSQL / pgAdmin
- Sample setup for postgreSQL database with pgAdmin web interface.Python / Flask / Redis
- Sample Python/Flask and a Redis database.React / Spring / MySQL
- Sample React application with a Spring backend and a MySQL database.React / Express / MySQL
- Sample React application with a Node.js backend and a MySQL database.React / Express / MongoDB
- Sample React application with a Node.js backend and a Mongo database.React / Rust / PostgreSQL
- Sample React application with a Rust backend and a Postgres database.React / Nginx
- Sample React application with Nginx.Spring / PostgreSQL
- Sample Java application with Spring framework and a Postgres database.WasmEdge / MySQL / Nginx
- Sample Wasm-based web application with a static HTML frontend, using a MySQL (MariaDB) database. The frontend connects to a Wasm microservice written in Rust, that runs using the WasmEdge runtime.WasmEdge / Kafka / MySQL
- Sample Wasm-based microservice that subscribes to a Kafka (Redpanda) queue topic, and transforms and saves any incoming message into a MySQL (MariaDB) database.
Single service samples
Basic setups for different platforms (not production ready - useful for personal use)
Gitea / PostgreSQL
Nextcloud / PostgreSQL
Nextcloud / Redis / MariaDB
Pi-hole / cloudflared
- Sample Pi-hole setup with use of DoH cloudflared servicePrometheus / Grafana
Wordpress / MySQL
Getting started
These instructions will get you through the bootstrap phase of creating and deploying samples of containerized applications with Docker Compose.
Prerequisites
- Make sure that you have Docker and Docker Compose installed
- Windows or macOS: Install Docker Desktop
- Linux: Install Docker and then Docker Compose
- Download some or all of the samples from this repository.
Running a sample
The root directory of each sample contains the compose.yaml
which
describes the configuration of service components. All samples can be run in
a local environment by going into the root directory of each one and executing:
docker compose up -d
Check the README.md
of each sample to get more details on the structure and
what is the expected output.
To stop and remove all containers of the sample application run:
docker compose down
Quickstart guides
In addition to all the ready to run Compose samples listed above the folder official-documentation-samples contains quickstart guides. Each of these step by step guides explain which files need to be created to build and run a Docker Compose application.
Contribute
We welcome examples that help people understand how to use Docker Compose for common applications. Check the Contribution Guide for more details.
Top Related Projects
:whale: A curated list of Docker resources and projects
Define and run multi-container applications with Docker
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot