i doing simple puting drupal in docker container
volumes: - /c/users/mark/drupalb/sites/all/modules:/var/www/html/sites/all/modules
this directive should mount home directory of modules containers module directory doesnt work seems thing people everyday how resolves
not clear problem is. in meantime here's working drupal example
example
the folowing compose file
└── docker-compose.yml
runs 2 containers, 1 drupal other db:
$ docker volume create --name drupal_sites $ docker-compose -d $ docker-compose ps name command state ports -------------------------------------------------------------------------------- dockercompose_db_1 docker-entrypoint.sh mysqld 3306/tcp dockercompose_web_1 apache2-foreground 0.0.0.0:8080->80/tcp
note how volume used store drupal sites created separately, defaults local storage can something more exotic fit needs
docker-compose.yml
version: '2' services: db: image: mysql environment: - mysql_root_password=letmein - mysql_database=drupal - mysql_user=drupal - mysql_password=drupal volumes: - /var/lib/mysql web: image: drupal depends_on: - db ports: - "8080:80" volumes: - drupal_sites:/var/www/html/sites - /var/www/private volumes: drupal_sites: external: true
Comments
Post a Comment