-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (44 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
54 lines (44 loc) · 1.48 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
LABEL "com.github.actions.icon"="upload-cloud"
LABEL "com.github.actions.color"="yellow"
LABEL "com.github.actions.name"="Deploy WordPress"
LABEL "com.github.actions.description"="Deploy WordPress code to a server"
LABEL "org.opencontainers.image.source"="https://github.com/rtCamp/action-deploy-wordpress"
ENV PATH="/composer/vendor/bin:~/.local/bin:$PATH"
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV COMPOSER_HOME=/composer
ENV DEFAULT_PHP_VERSION=7.4
RUN apt update && \
apt install -y \
bash \
git \
curl \
jq \
rsync \
zip \
unzip \
python3-pip \
software-properties-common && \
add-apt-repository ppa:ondrej/php && \
apt update && \
apt-get install -y php7.4-cli php7.4-curl php7.4-json php7.4-mbstring php7.4-xml php7.4-iconv php7.4-yaml && \
pip3 install shyaml --break-system-packages && \
rm -rf /var/lib/apt/lists/*
# Setup wp-cli
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
chmod +x wp-cli.phar && \
mv wp-cli.phar /usr/local/bin/wp
# Setup composer
RUN mkdir -p /composer && \
curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/bin/ --filename=composer
COPY composer.* /composer/
RUN cd /composer && composer install
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash && \
apt install -y nodejs && \
rm -rf /var/lib/apt/lists/*
COPY deploy.php hosts.yml 000-block-emails.php /
COPY *.sh /
RUN chmod +x /*.sh
ENTRYPOINT ["/entrypoint.sh"]