Docker Compose - простой пример - mysql + tomcat
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Docker Compose - простой пример - mysql + tomcat
# vi docker-compose.yml
version: "2" services: db: container_name: dbserver environment: - MYSQL_ROOT_PASSWORD=test1 - MYSQL_DATABASE=test1 - MYSQL_USER=test1 - MYSQL_PASSWORD=test1 image: "mysql:latest" ports: - "3306:3306" tomcat: container_name: appserver depends_on: - db image: "tomcat:latest" ports: - "8080:80"
Обязательно проверить через валидатор и запуск:
# docker-compose up -d