The easiest way to install these containers is with a docker-compose.yml file. The compose file will download and start two containers. The first container will start a customized version of the Official Wordpress container. The second is an Official MariaDB container.
The customized Wordpress container has the following added features.
Docker-compose will mount the following directories where the command is run.
mkdir wordpress
cd wordpress
curl -O https://raw.githubusercontent.com/tlezotte/wordpress/master/docker-compose.yml
** read note below **
docker-compose up -d
wait for it to initialize completely, and visit https://localhost:8443.
NOTE: Change the passwords for WORDPRESS_DB_PASSWORD and MYSQL_ROOT_PASSWORD before running docker-compose up -d. The passwords need to be the same.
docker ps -a
docker stop <container id>
docker start <container id>
docker restart <container id>
docker exec -it <container id> bash
docker exec -it <image name> bash
version: '2'
services:
wordpress:
image: tlezotte/wordpress
ports:
- 8443:443
environment:
WORDPRESS_DB_PASSWORD: Q2n0exmL
volumes:
- ./html:/var/www/html
- ./html_log:/var/log/apache2/
mysql:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: Q2n0exmL
volumes:
- ./database:/var/lib/mysql
- ./database_log:/var/log/mysql
Content type
Image
Digest
Size
174.5 MB
Last updated
over 9 years ago
docker pull tlezotte/wordpress