forked from 42AGV/webserv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (54 loc) · 1.11 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM debian:bullseye-slim
COPY . /webserv/
RUN apt-get update \
&& apt-get install -y \
build-essential \
coreutils \
wget \
bc \
python2.7 \
php7.4-fpm \
php7.4-common \
php7.4-mbstring \
php7.4-xmlrpc \
php7.4-soap \
php7.4-intl \
php7.4-mysql \
php7.4-cli \
php7.4-ldap \
php7.4-zip \
php7.4-curl \
php7.4-json \
php7.4-opcache \
php7.4-readline \
php7.4-xml \
php7.4-gd \
php7.4-cgi \
&& make CXX=g++ -j12 -C /webserv/ \
&& wget -q https://wordpress.org/latest.tar.gz -P /tmp/ \
&& tar xzf /tmp/latest.tar.gz -C /tmp/ \
&& mv /tmp/wordpress/ /webserv/html/wordpress/ \
&& cd /webserv/html/wordpress/ \
&& wget -q https://api.wordpress.org/secret-key/1.1/salt/ -O salt \
&& csplit -s wp-config-sample.php '/AUTH_KEY/' '/NONCE_SALT/+1' \
&& cat xx00 salt xx02 > wp-config.php \
&& rm salt xx00 xx01 xx02 \
&& rm -rf /tmp/*
EXPOSE 8080
EXPOSE 8081
EXPOSE 8082
EXPOSE 8083
EXPOSE 8084
EXPOSE 8085
EXPOSE 8086
EXPOSE 8087
EXPOSE 8088
EXPOSE 8089
EXPOSE 8090
EXPOSE 8091
EXPOSE 8092
EXPOSE 8093
EXPOSE 8094
EXPOSE 9000
RUN chmod +x /webserv/docker-entrypoint.sh
ENTRYPOINT ["./webserv/docker-entrypoint.sh"]