/docker-concrete5

Self-contained Concrete5 distribution for development with PHP, nginx, MariaDB, Adminer pre-installed

Primary LanguageShellMIT LicenseMIT

docker-concrete5

name url
Github https://github.com/teyc/docker-concrete5
Docker Hub https://hub.docker.com/repository/docker/teyc/concrete5
Docker teyc/docker-concrete5

A Concrete5 Docker image that contains PHP, MySQL and nginx preconfigured. Suitable for use as a development environment only.

Quick-Start

You can start the image by using bash or Powershell (see below). Then navigate to http://localhost:8080 to install Concrete5.

When prompted, you should set

Database: 127.0.0.1
Database user: c5_user
Database password: c5_password

bash

docker run -it \
    -e MYSQL_ROOT_PASSWORD=kHfj3_mp1@ha-agZMNB35AAgw \
    -p 8080:80 -p 13306:3306 \
    --name c5 teyc/concrete5:temp

Powershell

docker build . -t teyc/concrete5:8.5.4

docker run -it `
    -e MYSQL_ROOT_PASSWORD=kHfj3_mp1@ha-agZMNB35AAgw `
    -p 8080:80 -p 13306:3306 `
    --name c5 teyc/concrete5:8.5.4

Adminer

There is a copy of Adminer installed and is accessible on http://localhost:8080/adminer

Common tasks

Shell into running Docker instance

docker exec -it c5 /bin/sh
/var/www/html # mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.

Restart a stopped container

bash

containerId=(docker ps -qaf "name=c5")
docker start --attach $containerId

powershell

$containerId=(docker ps -qaf "name=c5")
docker start "--attach" $containerId

Contributing

docker build . -t teyc/concrete5:8.5.4

Removing docker images that has no tags

docker image prune

TODO

  1. Use multistage Docker builds

  2. Document how to persist MySQL data

  3. Document how to persist downloaded add-ons/packages