reference : https://hub.docker.com/r/chriswayg/concrete5.7/
Alternatively to the above, using docker-compose create the data-volume, database and Concrete5.7 containers all in one step, as can be seen in docker-compose-datavol.yml. Or if you prefer, use host volumes as shown below:
$ cd c5
$ cat docker-compose.yml
db:
image: mariadb
restart: always
environment:
- MYSQL_ROOT_PASSWORD=the_db_root_password
- MYSQL_USER=c5dbadmin
- MYSQL_PASSWORD=the_db_user_password
- MYSQL_DATABASE=c5db
# host volume
volumes:
- ./data/var/lib/mysql:/var/lib/mysql
web:
image: chriswayg/concrete5.7
restart: always
ports:
- "80:80"
- "443:443"
links:
- db
# host volumes
volumes:
- ./data/etc/apache2:/etc/apache2
- ./data/var/www/html:/var/www/html
$ docker-compose up -d
Visit your Concrete5 site at https://example.org for initial setup.
On the setup page, set your site-name and admin user password and enter the following
Database Information:
Server: db
MySQL Username: c5dbadmin
MySQL Password: the_db_user_password
Database Name: c5db
The Concrete5 and MariaDB application containers can be removed (even with docker rm -f -v), upgraded and reinitialized without loosing website or database data, as all website data is stored in the DATA container. (Just do not delete the DATA container;)
To find out where the data is stored on disk, check with docker inspect c5_DATA_1 | grep -A1 Source