I use the following docker-compose.yml to start containers and mount volumes relative to the docker-compose file. When I restart my computer the volumes are incorrect (not relative to the docker compose file) and Joomla will start download a new fresh version. When I run docker-compose stop and docker-compose up -d the containers are running as expected again
# https://hub.docker.com/_/joomla/
# image: joomla:3-apache-php7
joomla:
image: joomla
links:
- joomladb:mysql
ports:
- 8080:80
volumes:
- ./www:/var/www/html
environment:
JOOMLA_DB_PASSWORD: "password"
restart: always
joomladb:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: "password"
volumes:
- ./mysql:/var/lib/mysql
# ports: #This is exposed in case you want to login to the mysql from the docker host. It is not mandatory to expose it.
# - 10306:3306
restart: always
# The below phpmyadmin is optional. Remove it if you do not require it.
# Never expose phpmyadmin to the internet!
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
- PMA_ARBITRARY=1
restart: always
ports:
- 8081:80
# volumes:
# - /srv/docker/smartprojects/phpmyadmin/sessions:/sessions
links:
- joomladb:mysql
docker version: Docker version 17.06.0-ce, build 02c1d87 on Ubuntu 16.04
docker compose version: docker-compose version 1.14.0, build c7bdf9e