Skip to content

Commit d774ab7

Browse files
committed
Updated dockerfile
1 parent 95623b1 commit d774ab7

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

Dockerfile

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,31 @@
1-
FROM alpine:3.11
2-
MAINTAINER YesInteractive- http://yes-interactive.com
1+
FROM alpine:3.16
2+
LABEL 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-
apache2-http2 \
11-
unzip \
10+
unzip \
1211
# Install PHP from community
13-
&& apk --no-cache --repository http://dl-4.alpinelinux.org/alpine/v3.11/community/ add \
14-
php7=="7.3.22-r0" \
12+
&& apk --no-cache add \
13+
php7 \
1514
php7-apache2 \
1615
php7-common \
1716
php7-ctype \
1817
php7-curl \
1918
php7-json \
2019
php7-mbstring \
21-
php7-memcached \
22-
php7-opcache \
23-
php7-openssl \
2420
php7-session \
2521
php7-sockets \
22+
php7-opcache \
23+
php7-openssl \
2624
&& rm /var/cache/apk/* \
27-
2825
# Run required config / setup for apache
29-
# Ensure apache can create pid file
30-
#&& mkdir /run/apache2 \
26+
&& mkdir -p /run/apache2 \
3127
# Fix group
3228
&& 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 \
3629
# Enable modules
3730
&& sed -i -e 's/#LoadModule rewrite_module modules\/mod_rewrite.so/LoadModule rewrite_module modules\/mod_rewrite.so/g' /etc/apache2/httpd.conf \
3831
# Change document root to /app
@@ -48,18 +41,14 @@ RUN apk update \
4841
&& echo 'IncludeOptional /etc/apache2/conf.d/custom/*.conf' >> /etc/apache2/httpd.conf \
4942
# Fix modules
5043
&& 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 \
5544
# Empty /var/www and add an index.php to show phpinfo()
5645
&& rm -rf /var/www/* \
57-
&& echo '<?php phpinfo(); ?>' > /app/phpinfo.php \
58-
&& wget https://github.com/yesinteractive/dad-jokes_microservice/archive/master.zip -P /app \
46+
&& echo '<?php phpinfo(); ?>' > /app/phpinfo.php \
47+
&& wget https://github.com/yesinteractive/dad-jokes_microservice/archive/master.zip -P /app \
5948
&& unzip /app/master.zip -d /app \
6049
&& rm -rf /app/master.zip \
61-
&& cp -r /app/dadjokes-master/. /app \
62-
&& rm -rf /app/dajokes-master
50+
&& cp -r /app/dad-jokes_microservice-master/. /app \
51+
&& rm -rf /app/dad-jokes_microservice-master
6352

6453
WORKDIR /app
6554

0 commit comments

Comments
 (0)