-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
38 lines (33 loc) · 1.16 KB
/
Dockerfile
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
33
34
35
36
37
38
ARG BASE_IMAGE_TAG
FROM wodby/php:${BASE_IMAGE_TAG}
USER root
RUN set -ex; \
\
apk add --no-cache -t .wordperss-php-run-deps p7zip; \
apk add --no-cache -t .fetch-deps gnupg; \
\
cd /tmp; \
wp_cli_version="2.11.0"; \
url="https://github.com/wp-cli/wp-cli/releases/download/v${wp_cli_version}/wp-cli-${wp_cli_version}.phar"; \
curl -o wp.phar -fSL "${url}"; \
chmod +x wp.phar; \
mv wp.phar /usr/local/bin/wp; \
\
url="https://raw.githubusercontent.com/wp-cli/wp-cli/v${wp_cli_version}/utils/wp-completion.bash"; \
curl -o /usr/local/include/wp-completion.bash -fSL "${url}"; \
chmod +x /usr/local/include/wp-completion.bash; \
cd /home/wodby; \
echo "source /usr/local/include/wp-completion.bash" | tee -a .bash_profile .bashrc; \
\
if [[ -z "${PHP_DEV}" ]]; then \
echo "$(cat /etc/sudoers.d/wodby), /usr/local/bin/init_wordpress" > /etc/sudoers.d/wodby; \
fi; \
\
mv /usr/local/bin/actions.mk /usr/local/bin/php.mk; \
\
apk del --purge .fetch-deps; \
rm -rf /var/cache/apk/* /tmp/*
USER wodby
COPY templates /etc/gotpl/
COPY bin /usr/local/bin
COPY init /docker-entrypoint-init.d/