Answer the question
In order to leave comments, you need to log in
How to set up docker for wordpress?
Greetings, dear developers!
There was a need to install wordpress on docker and used the docker-compose.yml file from the documentation , supplementing it with a block for phpmyadmin:
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: wpphpmyadmin
links:
- "db:db"
environment:
MYSQL_USER: wordpress
MYSQL_ROOT_PASSWORD: somewordpress
restart: always
ports:
- "8080:80"
volumes:
- "/sessions"
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
db_data:
Answer the question
In order to leave comments, you need to log in
The problem is that you don't really edit the files in the container, to work with the contents of the container there is a great plugin for Visual Studio Code Extremely clear instructions.
https://marketplace.visualstudio.com/items?itemNam...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question