1 頁 (共 1 頁)

Windows 7 Docker Toolbox Share Volume

發表於 : 2018-09-17 20:36:05
yehlu
https://hk.saowen.com/a/5170b593e5360b8 ... fb409dfa8c

代碼: 選擇全部

mkdir /Sites
mkdir /Dockers
mount -t vboxsf Sites /Sites
mount -t vboxsf Dockers /Dockers

代碼: 選擇全部

www_data:
  image: busybox
  volumes:
  - /Sites:/var/www/html

mariadb:
  container_name: mariadb
  restart: always
  image: mariadb:latest
  ports:
    - "3306:3306"
  environment:
    - MYSQL_ROOT_PASSWORD=root
    - MYSQL_DATABASE=homestead
    - MYSQL_USER=homestead
    - MYSQL_PASSWORD=secret
  volumes:
    - /Dockers/mariadb/mysql:/var/lib/mysql/

php70:
  container_name: php70
  restart: always
  image: myphp:7.0-fpm
  links:
    - mariadb:db
  environment:
    - DB_HOST=mariadb
  volumes:
    - /Dockers/auto/php70.ini:/usr/local/etc/php/php.ini:ro
    - /Sites:/var/www/html
#    - /mnt/jpg/yuntech/:/var/www/html/yuntech/public/jpg
  volumes_from:
    - www_data
  working_dir:
    /var/www/html

nginx:
  container_name: nginx
  restart: always
  image: nginx:latest
  ports:
    - "80:80"
    - "443:443"
  links:
    - php70:php70
  volumes:
    - /Dockers/auto/nginx.conf:/etc/nginx/nginx.conf:ro
    - /Dockers/auto/conf.d:/etc/nginx/conf.d:ro
    - /Dockers/auto/ssl:/etc/ssl:ro
    - /Dockers/auto/letsencrypt:/etc/letsencrypt:ro
    - /Dockers/auto/.htpasswd:/etc/nginx/.htpasswd:ro
  volumes_from:
    - www_data