-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.php8.3
More file actions
51 lines (42 loc) · 1.44 KB
/
Copy pathDockerfile.php8.3
File metadata and controls
51 lines (42 loc) · 1.44 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
FROM public.ecr.aws/docker/library/alpine:3.19
ARG WP_VERSION
RUN apk add -u --no-cache \
composer \
curl \
git \
imagemagick \
mysql \
mysql-client \
php83 \
php83-curl \
php83-dom \
php83-exif \
php83-mysqli \
php83-pecl-imagick \
php83-simplexml \
php83-tokenizer \
php83-xml \
php83-xmlwriter
RUN apk add --no-cache php83-pear php83-dev gcc musl-dev make \
&& pecl83 install pcov && echo extension=pcov.so > /etc/php83/conf.d/pcov.ini \
&& apk del php83-pear php83-dev gcc musl-dev make
# Create php symlink to php83
RUN ln -sf /usr/bin/php83 /usr/bin/php
RUN curl -fsSL -o /tmp/wordpress.tar.gz https://wordpress.org/wordpress-${WP_VERSION}.tar.gz \
&& mkdir /wordpress \
&& tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C /wordpress \
&& rm /tmp/wordpress.tar.gz
RUN curl -fsSL -o /tmp/wp-phpunit.tar.gz https://github.com/wp-phpunit/wp-phpunit/archive/${WP_VERSION}.0.tar.gz \
&& mkdir /wp-phpunit \
&& tar --strip-components=1 -zxmf /tmp/wp-phpunit.tar.gz -C /wp-phpunit \
&& rm /tmp/wp-phpunit.tar.gz
RUN mysql_install_db --user=mysql --ldata=/var/lib/mysql
RUN sh -c 'mysqld_safe --datadir=/var/lib/mysql &' && sleep 4 && mysql -u root -e "CREATE DATABASE wordpress"
ENV WP_DEVELOP_DIR=/wp-phpunit
ENV WP_PHPUNIT__TESTS_CONFIG=/wp-tests-config.php
VOLUME ["/code"]
WORKDIR /code
COPY ./docker-entrypoint.sh /entrypoint.sh
COPY ./wp-tests-config.php /wp-tests-config.php
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]