Sign inSign up

centos/wordpress

By centos

•Updated over 7 years ago

Automated wordpress build

Image
3

10K+

centos/wordpress repository overview

⁠dockerfiles-centos-wordpress-mariadb

This dockerfile creates wordpress image that is based on CentOS and utilizes a centos/mariadb container for a database.

⁠Build

To build the wordpress container simply:

docker build -t <yourname>/wordpress:centos7 .

⁠Setup Database

First get the mariadb container up and running:

VOLUME='-v /var/lib/mysql'
DATABASE=mydb
USER=myuser
PASSWORD=password
ROOTPASS=rootpass
docker run -d                        \
    -e MYSQL_USER=$USER              \
    -e MYSQL_PASSWORD=$PASSWORD      \
    -e MYSQL_DATABASE=$DATABASE      \
    -e MYSQL_ROOT_PASSWORD=$ROOTPASS \
    $VOLUME --name=mariadb centos/mariadb

NOTE:: If you don't want a VOLUME then don't assign the variable

⁠Run wordpress

Next start the wordpress with the db container linked:

docker run --link=mariadb:db -d --name wordpress -p 80:80 <yourname>/wordpress

Now connect to wordpress on localhost:8080 from your browser.

Tag summary

Content type

Image

Digest

Size

127.8 MB

Last updated

over 7 years ago

docker pull centos/wordpress