-
Notifications
You must be signed in to change notification settings - Fork 1.1k
How should I add themes or plugins into the container? #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Also #146 And then copied over in the wordpress/php7.2/fpm/docker-entrypoint.sh Lines 43 to 55 in f716ece
|
I did this in a Dockerfile:
Built it and ran it. I don't see the local folder in the container either under Am I doing something wrong? I would suggest we update the readme on Docker hub so it's clear how to do this after we have steps outlined. |
Using your Dockerfile it behaves as expected, perhaps you have some sort of permission error for the docker-compose.yml version: '3.1'
services:
wordpress:
image: wordpress:test
restart: always
ports:
- 7070:80
environment:
WORDPRESS_DB_PASSWORD: example
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: example Dockerfile FROM wordpress
ADD ./christmas-sweets /usr/src/wordpress/wp-content/themes/christmas-sweets $ docker build --no-cache . -t wordpress:test
Sending build context to Docker daemon 1MB
Step 1/2 : FROM wordpress
---> ca0fefec932b
Step 2/2 : ADD ./christmas-sweets /usr/src/wordpress/wp-content/themes/christmas-sweets
---> 94d8f5c26eaf
Successfully built 94d8f5c26eaf
Successfully tagged wordpress:test
$ docker exec -it 497 bash
root@497a72d283a0:/var/www/html# ls -l wp-content/themes/
total 20
drwxr-xr-x 7 www-data www-data 4096 Oct 9 17:42 christmas-sweets
-rw-r--r-- 1 www-data www-data 28 Jun 5 2014 index.php
drwxr-xr-x 6 www-data www-data 4096 Aug 2 20:39 twentyfifteen
drwxr-xr-x 5 www-data www-data 4096 Aug 2 20:39 twentyseventeen
drwxr-xr-x 7 www-data www-data 4096 Aug 2 20:39 twentysixteen
root@497a72d283a0:/var/www/html# ls -l wp-content/themes/christmas-sweets/
total 760
-rw-r--r-- 1 www-data www-data 1573 Oct 9 17:20 comments.php
-rw-r--r-- 1 www-data www-data 1878 Oct 9 17:20 content.php
drwxr-xr-x 2 www-data www-data 4096 Oct 9 17:20 css
-rw-r--r-- 1 www-data www-data 2604 Oct 9 17:20 footer.php
-rw-r--r-- 1 www-data www-data 12974 Oct 9 17:20 functions.php
-rw-r--r-- 1 www-data www-data 2026 Oct 9 17:20 header.php
drwxr-xr-x 2 www-data www-data 4096 Oct 9 17:20 images
drwxr-xr-x 2 www-data www-data 4096 Oct 9 17:20 inc
-rw-r--r-- 1 www-data www-data 3146 Oct 9 17:20 index.php
drwxr-xr-x 2 www-data www-data 4096 Oct 9 17:20 js
-rw-r--r-- 1 www-data www-data 5637 Oct 9 17:20 readme.txt
-rw-r--r-- 1 www-data www-data 647548 Oct 9 17:20 screenshot.png
-rw-r--r-- 1 www-data www-data 442 Oct 9 17:20 sidebar-shop.php
-rw-r--r-- 1 www-data www-data 436 Oct 9 17:20 sidebar.php
-rw-r--r-- 1 www-data www-data 872 Oct 9 17:20 singular.php
-rw-r--r-- 1 www-data www-data 47213 Oct 9 17:20 style.css
drwxr-xr-x 2 www-data www-data 4096 Oct 9 17:20 templates
root@497a72d283a0:/var/www/html# ls -l /usr/src/wordpress/wp-content/themes/christmas-sweets/
total 760
-rw-r--r-- 1 root root 1573 Oct 9 17:20 comments.php
-rw-r--r-- 1 root root 1878 Oct 9 17:20 content.php
drwxr-xr-x 2 root root 4096 Oct 9 17:20 css
-rw-r--r-- 1 root root 2604 Oct 9 17:20 footer.php
-rw-r--r-- 1 root root 12974 Oct 9 17:20 functions.php
-rw-r--r-- 1 root root 2026 Oct 9 17:20 header.php
drwxr-xr-x 2 root root 4096 Oct 9 17:20 images
drwxr-xr-x 2 root root 4096 Oct 9 17:20 inc
-rw-r--r-- 1 root root 3146 Oct 9 17:20 index.php
drwxr-xr-x 2 root root 4096 Oct 9 17:20 js
-rw-r--r-- 1 root root 5637 Oct 9 17:20 readme.txt
-rw-r--r-- 1 root root 647548 Oct 9 17:20 screenshot.png
-rw-r--r-- 1 root root 442 Oct 9 17:20 sidebar-shop.php
-rw-r--r-- 1 root root 436 Oct 9 17:20 sidebar.php
-rw-r--r-- 1 root root 872 Oct 9 17:20 singular.php
-rw-r--r-- 1 root root 47213 Oct 9 17:20 style.css
drwxr-xr-x 2 root root 4096 Oct 9 17:20 templates |
Yeah huh I'm not sure what went wrong there. I am able to get it working now 😄 I would suggest we add instructions for adding themes and plugins into the docs README. Should I open an issue on that repository? |
It's not obvious to me how I should add themes or plugins into the container. How should I do that?
I've tried making a volume in the
docker-compose.yml
like so:but that does not work, I assume because of a conflicting volume defined in the Dockerfile
The text was updated successfully, but these errors were encountered: