Created
November 1, 2019 11:20
-
-
Save ualmtorres/22c8112df5a724e0d6f99b4c143e0ac0 to your computer and use it in GitHub Desktop.
Dockerfile para PHP, Apache y Phalcon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get install -yq --no-install-recommends \ | |
apt-utils \ | |
curl \ | |
# Install git | |
git \ | |
# Install apache | |
apache2 \ | |
# Install php 7.2 | |
php \ | |
libapache2-mod-php \ | |
php-mcrypt \ | |
php-mysql \ | |
php-curl \ | |
nano \ | |
ca-certificates \ | |
locales \ | |
&& apt-get clean && rm -rf /var/lib/apt/lists/* | |
RUN curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | /bin/bash | |
RUN apt-get install -y php7.0-phalcon | |
# Set locales | |
RUN locale-gen en_US.UTF-8 en_GB.UTF-8 es_ES.UTF-8 | |
COPY conf/apache2.conf /etc/apache2/apache2.conf | |
COPY conf/dir.conf /etc/apache2/mods-available/dir.conf | |
RUN a2enmod rewrite | |
RUN service apache2 restart | |
EXPOSE 80 443 | |
WORKDIR /var/www/html | |
RUN rm /var/www/html/index.html | |
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD curl -f http://localhost || exit 1 | |
CMD apachectl -D FOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment