You need to have a MySQL database up and running for Wordpress to work.
Build the Docker image using the following command
$ docker build -t php-wordpress:<tag> .
Run the Docker container using the command below.
$ docker run -d -p 8080:80 php-wordpress:<tag>
$ docker run -e WORDPRESS_DB_HOST=<DOCKER_IP> -e WORDPRESS_DB_PASSWORD=<DB_PASSWORD> -v /your/path/to/wordpress:/var/www/html/wp-content/ -d -p 8080:80 php-wordpress:<tag>
Follow the steps mentioned below for git based pipeline
-
Ensure that you have a git project
-
Commit your changes
$ git add . $ git commit -m "message"
-
Push the changes to git
$ git push <remote> master
WORDPRESS_DB_HOST
- Host of MySQL server.WORDPRESS_DB_PASSWORD
- Password of MYSQL database.WORDPRESS_DB_USER
- UserName of MYSQL database (defaults to "root").WORDPRESS_DB_NAME
- Database Name (defaults to "wordpress").
/var/www/html
- Should contain the wordpress source files (/your/path/to/wordpress
)