version: '2'
services:
db:
image: mysql:5.6
volumes:
- "/my/custom:/etc/mysql/conf.d"
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: Macnica123
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: 192.168.0.13:3306
WORDPRESS_DB_PASSWORD: Macnica123
<!DOCTYPE html>
<html>
<head>
<title>TDU Test page</title>
</head>
<body>
<h1>[[ Hello TDU Students!]]</h1>
<h2>This is TDU docker handson!</h2>
</body>
</html>
from nginx
RUN apt-get update -y
COPY index.html /usr/share/nginx/html/
RUN chmod +x /usr/share/nginx/html/index.html
EXPOSE 80
人材募集中!!
採用応募ページへ