Skip to content

Instantly share code, notes, and snippets.

@valentinbud
Created June 18, 2014 08:31
Show Gist options
  • Save valentinbud/a45e96bd45f4a4401300 to your computer and use it in GitHub Desktop.
Save valentinbud/a45e96bd45f4a4401300 to your computer and use it in GitHub Desktop.
FROM ubuntu:trusty
MAINTAINER "Valentin Bud <[email protected]>"
# Update the Operating System
RUN apt-get update && apt-get upgrade -y
# Install PHP and Requirements
RUN apt-get install php php-fpm -y
# Add code in image
ADD ./ /var/www/app
# Run composer to install libraries
RUN /usr/bin/php /var/www/app/composer.phar install
# Run tests
RUN /usr/bin/php /var/www/app/codecept.phar run
# Run other crafted scripts that process environment and configures
# the application.
# An example would be a script that extracts from MYSQL_SERVER env
# variable the IP address of the server and stores it in /var/www/app/dbconfig.inc.
# Run any other stuff that needs to be made to run the application.
# Run the app
CMD ["-f", "/etc/php/fpm/pools.d/app.pool", "--nodaemon"]
ENTRYPOINT ["/usr/bin/php-fpm"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment