Docker compose wordpress

In this tutorial, How do I use Docker compose WordPress? Because docker WordPress is using two containers in Docker. Docker the essential for DevOps Roles.

Docker image

  • WordPress
  • MySQL

Installed docker compose link here

Docker compose WordPress

The configuration file and start docker-compose.

version '2'
services: 
 web:
  image: wordpress
  ports:
    - "8888:80"
  environment:
    WORDPRESS_DB_PASSWORD: password_here
    WORDPRESS_DB_HOST: db
 db:
  image: mysql
  environment:
    MYSQL_ROOT_PASSWORD: password_here

Starting docker in the background with -d option.

$ docker-compose up -d

After, you can check http://localhost:8888 in the browser.

The end service is down by the command below

$ docker-compose down

Conclusion

Thought the article, You can use “Docker compose WordPress as above. I hope will this your helpful.

, ,

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published.

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.