Created
August 29, 2016 15:24
-
-
Save raisiqueira/435d0cf8ff4d8a0bf64ed22fb4180b7e to your computer and use it in GitHub Desktop.
Dockerfile for Slim Framework Application
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
| # Due to layout of this project, the dockerfile will be moved up two directories and run during | |
| # the build. Thus when performing any ADD commands, remember that this is "where you are" | |
| FROM ubuntu:14.04 | |
| RUN apt-get update && \ | |
| apt-get dist-upgrade -y && \ | |
| apt-get install vim apache2 libapache2-mod-php5 php5-cli php5-mysqlnd curl php5-curl zip -y | |
| # Enable the php mod we just installed | |
| RUN a2enmod php5 | |
| # Enable headers for CORS request for Swagger UI | |
| RUN a2enmod rewrite | |
| # Add our websites files to the default apache directory (/var/www) | |
| ADD settings /var/www/my-site/settings | |
| # Add our websites files to the default apache directory (/var/www) | |
| ADD project /var/www/my-site/project | |
| # Update our apache sites available with the config we created | |
| ADD project/docker/apache-config.conf /etc/apache2/sites-enabled/000-default.conf | |
| # expose port 80 and 443 (ssl) for the web requests | |
| EXPOSE 80 | |
| EXPOSE 443 | |
| # Execute the containers startup script which will start many processes/services | |
| # The startup file was already added when we added "project" | |
| CMD ["/bin/bash", "/var/www/my-site/project/docker/startup.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment