Skip to content

Instantly share code, notes, and snippets.

@samcrosoft
Created September 14, 2018 11:15
Show Gist options
  • Save samcrosoft/a86215df1fa066cb7a514e32916b8129 to your computer and use it in GitHub Desktop.
Save samcrosoft/a86215df1fa066cb7a514e32916b8129 to your computer and use it in GitHub Desktop.
Dockerfile for Running Laravel With PHP Local Server
FROM epcallan/php7-testing-phpunit:7.1-phpunit7
LABEL maintainer="Adebola Olowofela <samcrosoft@gmail.com>"
WORKDIR /var/www
# this will copy the code from the src folder into the working directory
ADD src ./
CMD ["php", "-S", "0.0.0.0:80", "-t", "./public", "./public/index.php"]
EXPOSE 80
HEALTHCHECK --interval=1m CMD curl -f http://localhost/ || exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment