Skip to content

Commit 3dbaf33

Browse files
committed
fixed dockerfile
1 parent d774ab7 commit 3dbaf33

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

Dockerfile

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
1-
FROM alpine:3.16
2-
LABEL maintainer="YesInteractive- http://yes-interactive.com"
1+
FROM alpine:3.11
2+
MAINTAINER YesInteractive- http://yes-interactive.com
33

44
# Install modules and updates
55
RUN apk update \
66
&& apk --no-cache add \
77
openssl \
88
apache2 \
99
apache2-ssl \
10-
unzip \
10+
apache2-http2 \
11+
unzip \
1112
# Install PHP from community
12-
&& apk --no-cache add \
13-
php7 \
13+
&& apk --no-cache --repository http://dl-4.alpinelinux.org/alpine/v3.11/community/ add \
14+
php7=="7.3.22-r0" \
1415
php7-apache2 \
1516
php7-common \
1617
php7-ctype \
1718
php7-curl \
1819
php7-json \
1920
php7-mbstring \
20-
php7-session \
21-
php7-sockets \
21+
php7-memcached \
2222
php7-opcache \
2323
php7-openssl \
24+
php7-session \
25+
php7-sockets \
2426
&& rm /var/cache/apk/* \
27+
2528
# Run required config / setup for apache
26-
&& mkdir -p /run/apache2 \
29+
# Ensure apache can create pid file
30+
#&& mkdir /run/apache2 \
2731
# Fix group
2832
&& sed -i -e 's/Group apache/Group www-data/g' /etc/apache2/httpd.conf \
33+
# Fix ssl module
34+
&& sed -i -e 's/LoadModule ssl_module lib\/apache2\/mod_ssl.so/LoadModule ssl_module modules\/mod_ssl.so/g' /etc/apache2/conf.d/ssl.conf \
35+
&& sed -i -e 's/LoadModule socache_shmcb_module lib\/apache2\/mod_socache_shmcb.so/LoadModule socache_shmcb_module modules\/mod_socache_shmcb.so/g' /etc/apache2/conf.d/ssl.conf \
2936
# Enable modules
3037
&& sed -i -e 's/#LoadModule rewrite_module modules\/mod_rewrite.so/LoadModule rewrite_module modules\/mod_rewrite.so/g' /etc/apache2/httpd.conf \
3138
# Change document root to /app
@@ -41,14 +48,18 @@ RUN apk update \
4148
&& echo 'IncludeOptional /etc/apache2/conf.d/custom/*.conf' >> /etc/apache2/httpd.conf \
4249
# Fix modules
4350
&& sed -i 's#AllowOverride None#AllowOverride All#' /etc/apache2/httpd.conf \
51+
&& sed -i -e 's/ServerRoot \/var\/www/ServerRoot \/etc\/apache2/g' /etc/apache2/httpd.conf \
52+
&& mv /var/www/modules /etc/apache2/modules \
53+
&& mv /var/www/run /etc/apache2/run \
54+
&& mv /var/www/logs /etc/apache2/logs \
4455
# Empty /var/www and add an index.php to show phpinfo()
4556
&& rm -rf /var/www/* \
46-
&& echo '<?php phpinfo(); ?>' > /app/phpinfo.php \
47-
&& wget https://github.com/yesinteractive/dad-jokes_microservice/archive/master.zip -P /app \
57+
&& echo '<?php phpinfo(); ?>' > /app/phpinfo.php \
58+
&& wget https://github.com/yesinteractive/dad-jokes_microservice/archive/master.zip -P /app \
4859
&& unzip /app/master.zip -d /app \
4960
&& rm -rf /app/master.zip \
50-
&& cp -r /app/dad-jokes_microservice-master/. /app \
51-
&& rm -rf /app/dad-jokes_microservice-master
61+
&& cp -r /app/dadjokes-master/. /app \
62+
&& rm -rf /app/dajokes-master
5263

5364
WORKDIR /app
5465

0 commit comments

Comments
 (0)