-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (25 loc) · 885 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Base Docker File
# Extends base/nginx
# https://github.com/outrunthewolf/dockerfile-base-nginx
FROM base/nginx
# Miantainer
MAINTAINER outrunthewolf
# ENVIRONMENTAL variables
ENV USERNAME laravel
ENV SITEPATH "/home/$USERNAME/public_html"
# create a user
RUN useradd -d /home/$USERNAME -m $USERNAME
RUN chsh -s /bin/bash $USERNAME
# Add base nginx conf
ADD ./config/default_nginx_conf /usr/local/nginx/conf/nginx.conf
# Add a default vhost, activate host file
ADD ./config/default_vhost /usr/local/nginx/conf/sites-available/default.conf
RUN ln -s /usr/local/nginx/conf/sites-available/default.conf /usr/local/nginx/conf/sites-enabled/default.conf
# Set up php fpm, restart php
ADD ./config/default_php_pool /etc/php5/fpm/pool.d/default.conf
RUN touch /var/log/php-slowlog.log
# Expose some ports
EXPOSE 80
# CMD
CMD service php5-fpm restart && \
/usr/local/nginx/sbin/nginx