Skip to content

Instantly share code, notes, and snippets.

@paulredmond
Created September 22, 2017 14:39
Show Gist options
  • Save paulredmond/0eb7494b37cb63acd643a8ca2b3edaca to your computer and use it in GitHub Desktop.
Save paulredmond/0eb7494b37cb63acd643a8ca2b3edaca to your computer and use it in GitHub Desktop.
Ubuntu Unit Dockerfile for PHP and Laravel
FROM ubuntu:xenial
RUN set -xe \
&& apt-get -y update \
&& apt-get -y install --no-install-recommends curl php \
&& curl http://nginx.org/keys/nginx_signing.key | apt-key add - \
&& echo "deb http://nginx.org/packages/mainline/ubuntu/ xenial nginx" | tee -a /etc/apt/sources.list \
&& echo "deb-src http://nginx.org/packages/mainline/ubuntu/ xenial nginx" | tee -a /etc/apt/sources.list \
&& apt-get -y update \
&& apt-get -y install unit \
&& unitd --version
WORKDIR /www/laravel
COPY ./src /www/laravel
RUN chown -R www-data:www-data /www/laravel
CMD ["unitd", "--no-daemon"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment