Mã nguồn ví dụ này được thực hiện lại theo hướng dẫn:
- Introduction to Docker Compose Tool for Multi-Container Applications
- Docker Volumes and Networks with Compose
git clone https://github.com/TechMaster/DockerComposeDemo.git
docker-compose up -d
Hệ thống sẽ tạo ra 3 docker container:
- nginx hứng ở cổng 80, forward request đến cổng 2368
- ghost hứng ở cổng 2368, sau đó gọi vào mysql
- mysql hứng ở cổng 3306