Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
For the mariadb/mysql section I wanted to preserve the database files, so the following volume pattern for the wordpress_db section worked for me:
wordpress_db:
......
volumes:
- /somehostpath/dbsubdirname:/var/lib/mysql
........
This maps the host directory /somehostpath/dbsubdirname to the standard location within the container for mariadb/mysql database directory. The phpMyAdmin worked as expected.
With this setup, can I still use socket connection to the database instead of the TCP/IP protocoll? I mean as: $mysqli = new mysqli(NULL, ‘username’, ‘password’, ‘database’, NULL, ‘/var/lib/mysql/mysql.sock’);
Is the script and the MySQL server on the same “machine” in this setup? It seems socket connection is 25% faster than TCP/IP… : http://brandon.northcutt.net/article/MySQL+Connection+Speed%26%2358%3B+Socket+VS+TCP%26%2347%3BIP/20140425.html
Just a small typo in: Start WordPress again:
docker-compose up -d
Once the prompt returns, WordPress should be up and running again — this time using the host filesystem to store the document root.
While this solution works great, i randomly get the “Error establishing a database connection”, after a while that the container is up. The db container stops and i have to run the docker-compose.yml file again to bring the db up.
Any ideas why this common wordpress error happens here?
Everything works great for me except step 5. No errors or anything, the files just aren’t there after I run docker-compose up -d. The WordPress instance is also running without error. Running docker inspect I see the correct directories listed in Mounts. Any ideas?
Hello, i used your docker-compose.yml and run the command, but it said: Bind for 0.0.0.0:8080 failed: port already allocated Error: encountered error while bringing up project What do i have to do next?
Conceptually - How do we configure an apache virtual host for the container so that we can reach our servers IP address? Is the default localhost? I feel like that is an important conceptual piece of this tutorial that is missing.
Hello,
I’ve got this error when executing docker-compose up
Traceback (most recent call last): File “/usr/bin/docker-compose”, line 5, in <module> from pkg_resources import load_entry_point File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3011, in <module> parse_requirements(requires), Environment() File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 626, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5
I try to update the compose file with v2 version
version: '2'
services:
wordpress:
image: wordpress:latest
container_name: wp
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_PASSWORD: db_pass
wp_db:
image: mariadb:latest
container_name: wp_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: db_pass
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
restart: always
ports:
- 8181:80
I can connect to phpmyadmin but I cannot connect to WP.
Any idea ?