Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
Last active May 7, 2019 17:28
Show Gist options
  • Save geoffyuen/eb9cc0666ca4b8af1f8f238de1f7098f to your computer and use it in GitHub Desktop.
Save geoffyuen/eb9cc0666ca4b8af1f8f238de1f7098f to your computer and use it in GitHub Desktop.
WordPress Docker (Official WP, MariaDB)

docker-compose up

If you don't need zip functionality (like for Duplicator), in the compose file, comment out the build line and uncomment the image line.

version: '2'
services:
wordpress:
build: .
# image: wordpress
ports:
- 80:80
environment:
WORDPRESS_DB_PASSWORD: root
volumes:
- "./wp:/var/www/html"
mysql:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- "./db:/var/lib/mysql"
FROM wordpress
RUN apt-get update && apt-get install -y zlib1g-dev && rm -rf /var/lib/apt/lists/* && docker-php-ext-install zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment