-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 898 Bytes
/
Dockerfile
File metadata and controls
33 lines (27 loc) · 898 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
33
# Download ubi9 image from registry.access.redhat.com
FROM registry.access.redhat.com/ubi9/ubi:latest
# Download the necessary components
RUN dnf install -y \
php \
php-mysqlnd \
php-json \
php-curl \
php-gd \
php-mbstring \
php-xml \
php-zip \
httpd \
tar \
wget\
unzip \
&& dnf clean all
# Install and place the WordPress
RUN wget https://wordpress.org/latest.zip -O /tmp/wordpress.zip && unzip /tmp/wordpress.zip -d /var/www/html && rm /tmp/wordpress.zip
RUN chown -R 1001:0 /var/www/html && chmod -R g+w /var/www/html
WORKDIR /var/www/html/wordpress/
# Open Port
EXPOSE 8080
# Update configuration Apache
RUN sed -i 's/^Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf
# While start up and running the container
CMD ["php", "-p", "-S", "0.0.0.0:8080", "-t", "/var/www/html/wordpress/"]