Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A Dockerfile for a Laravel PHP Application with Caddy Server
FROM php:7.1-fpm
LABEL maintainer="Paul Redmond <>"
# Install application dependencies
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
",http.realip&license=personal" \
| tar --no-same-owner -C /usr/bin/ -xz caddy \
&& chmod 0755 /usr/bin/caddy \
&& /usr/bin/caddy -version \
&& docker-php-ext-install mbstring pdo pdo_mysql
COPY . /srv/app
COPY docker/Caddyfile /etc/Caddyfile
WORKDIR /srv/app/
RUN chown -R www-data:www-data /srv/app
CMD ["/usr/bin/caddy", "--conf", "/etc/Caddyfile", "--log", "stdout"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment