Skip to content

Commit

Permalink
Merge pull request #35 from samuelkarp/amazonlinux
Browse files Browse the repository at this point in the history
Migrate to Amazon Linux 2
  • Loading branch information
nathanpeck authored Jul 2, 2019
2 parents de6ba86 + 57ddeb8 commit db216f5
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
FROM ubuntu:12.04
FROM amazonlinux:2

# Install dependencies
RUN apt-get update -y
RUN apt-get install -y git curl apache2 php5 libapache2-mod-php5 php5-mcrypt php5-mysql
RUN yum install -y \
curl \
httpd \
php \
&& ln -s /usr/sbin/httpd /usr/sbin/apache2

# Install app
RUN rm -rf /var/www/*
ADD src /var/www
RUN rm -rf /var/www/html/* && mkdir -p /var/www/html
ADD src /var/www/html

# Configure apache
RUN a2enmod rewrite
RUN chown -R www-data:www-data /var/www
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
RUN chown -R apache:apache /var/www
ENV APACHE_RUN_USER apache
ENV APACHE_RUN_GROUP apache
ENV APACHE_LOG_DIR /var/log/apache2

EXPOSE 80
Expand Down

0 comments on commit db216f5

Please sign in to comment.