-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·32 lines (24 loc) · 845 Bytes
/
Copy pathDockerfile
File metadata and controls
executable file
·32 lines (24 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM wordpress:latest
RUN apt-get update && \
apt install -y \
bash-completion \
less \
sudo
RUN usermod -s /bin/bash www-data
RUN mkdir -p /usr/local/share/wp && \
curl \
-o /usr/local/share/wp/wp.bin \
https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod +x /usr/local/share/wp/wp.bin
RUN mkdir -p /etc/bash_completion.d/ && \
curl \
-o /etc/bash_completion.d/wp-completion.bash \
https://raw.githubusercontent.com/wp-cli/wp-cli/v2.11.0/utils/wp-completion.bash
RUN cat >>/root/.bashrc <<EOF
source /etc/profile.d/bash_completion.sh
chown www-data /var/www/html/wp-content/plugins/my-plugin/
chmod g+w /var/www/html/wp-content/plugins/my-plugin/
EOF
RUN mkdir -p /var/www/html/wp-content/plugins/my-plugin/
COPY wp.sh /usr/local/bin/wp
COPY quickinstall.sh /usr/local/bin/quickinstall