Skip to content

Commit db216f5

Browse files
authored
Merge pull request #35 from samuelkarp/amazonlinux
Migrate to Amazon Linux 2
2 parents de6ba86 + 57ddeb8 commit db216f5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
FROM ubuntu:12.04
1+
FROM amazonlinux:2
22

33
# Install dependencies
4-
RUN apt-get update -y
5-
RUN apt-get install -y git curl apache2 php5 libapache2-mod-php5 php5-mcrypt php5-mysql
4+
RUN yum install -y \
5+
curl \
6+
httpd \
7+
php \
8+
&& ln -s /usr/sbin/httpd /usr/sbin/apache2
69

710
# Install app
8-
RUN rm -rf /var/www/*
9-
ADD src /var/www
11+
RUN rm -rf /var/www/html/* && mkdir -p /var/www/html
12+
ADD src /var/www/html
1013

1114
# Configure apache
12-
RUN a2enmod rewrite
13-
RUN chown -R www-data:www-data /var/www
14-
ENV APACHE_RUN_USER www-data
15-
ENV APACHE_RUN_GROUP www-data
15+
RUN chown -R apache:apache /var/www
16+
ENV APACHE_RUN_USER apache
17+
ENV APACHE_RUN_GROUP apache
1618
ENV APACHE_LOG_DIR /var/log/apache2
1719

1820
EXPOSE 80

0 commit comments

Comments
 (0)