Last active
August 24, 2019 09:56
-
-
Save vaughany/5111cb265c618b421e66555dadb32436 to your computer and use it in GitHub Desktop.
Dockerfile to install Ubuntu, Apache2 and PHP7.2
This file contains hidden or 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
| # A basic apache server with PHP. To use either add or bind mount content under /var/www | |
| # https://docs.docker.com/engine/reference/builder/ | |
| FROM ubuntu:16.04 | |
| # Use bash instead of sh. | |
| SHELL ["/bin/bash", "-c"] | |
| WORKDIR /app | |
| ADD . /app | |
| # Use the default UTF-8 language. | |
| ENV LANG C.UTF-8 | |
| RUN apt-get update && apt-get -y install software-properties-common && add-apt-repository ppa:ondrej/php && apt-get update && apt-get install -y apache2 && apt-get install -y php7.2 && apt-get install -y libapache2-mod-php7.2 php7.2-curl php7.2-json && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| EXPOSE 80 443 | |
| RUN cp info.php /var/www/html/ | |
| ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment