-
Notifications
You must be signed in to change notification settings - Fork 47
/
Dockerfile
32 lines (22 loc) · 934 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
FROM nebo15/alpine-php:php-7.0
MAINTAINER Nebo #15 [email protected]
ENV HOME=/app
# Setup project structure
RUN mkdir -p ${HOME}/storage/app && \
mkdir ${HOME}/storage/logs && \
mkdir -p ${HOME}/storage/framework/cache && \
mkdir ${HOME}/storage/framework/sessions && \
mkdir ${HOME}/storage/framework/views && \
mkdir -p ${HOME}/public/dump
# Prefetch dependencies
COPY composer.* ${HOME}/
RUN composer --no-ansi --no-dev --no-interaction --no-progress --no-scripts --no-autoloader -d=${HOME} install
# Add project sources.
# To skip some files add them to .dockerignore file
COPY . ${HOME}/
# Install dependencies and generate autoloader
RUN composer --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader -d=${HOME} install
# Fix paths access rights
RUN chmod 777 -Rf ${HOME}/storage/ ${HOME}/public/dump/
RUN cp ${HOME}/.env.example ${HOME}/.env
CMD ["php-fpm", "-F"]