my wordpress container for research purposes
185
This is a WordPress container for my research needs (not recommended for production). This container uses Apache2, mysql-server, phpmydmin, and the Ubuntu operating system.
By default, the host used is research.local and it has been registered in the WordPress settings inside. This container comes with several features such as:
Administrator -> admin:1
Author -> user_author:1
Editor -> user_editor:1
Contributor -> user_contributor:1
Subscriber -> user_subscriber:1
For those who want to try, you can follow these instructions:
sudo apt install nginx
docker pull justakazh/wp-research
docker run -td --name wordpress -p <local_port>:80 justakazh/wp-research
docker run -td --name wordpress -p <local_port>:80 -v yourvolume:/var/www/html justakazh/wp-research
Please adjust the command as needed.
/etc/nginx/sites-available/wordpress.conf as a virtual host / reverse proxy to the container.server {
listen 80;
listen [::]:80;
server_name research.local;
location / {
proxy_pass http://CHANGE_THIS_TO_CONTAINER_IP;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
To get the container IP, run the following command:
docker inspect --format='{{.NetworkSettings.IPAddress}}' wordpress
Next, create a symbolic link:
ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/wordpress.conf
nginx -t
service nginx restart
nano /etc/hosts
127.0.0.1 research.local
If using WSL and you want to access it through Windows, you can change your hosts file in C:\Windows\System32\drivers\etc\hosts and point it to the WSL IP.
Content type
Image
Digest
sha256:0e12cce4f…
Size
266.1 MB
Last updated
over 2 years ago
docker pull justakazh/wp-research