43 lines
985 B
Docker
43 lines
985 B
Docker
|
FROM alpine:latest AS base_php
|
||
|
# disable package prompt interaction
|
||
|
|
||
|
# install runit (init scheme)
|
||
|
RUN apk update && apk add \
|
||
|
mariadb-client \
|
||
|
php7 \
|
||
|
php7-mysqli \
|
||
|
php7-session \
|
||
|
php7-xdebug \
|
||
|
php7-opcache \
|
||
|
php7-mysqli \
|
||
|
php7-mbstring \
|
||
|
php7-curl \
|
||
|
php7-gd \
|
||
|
php7-ctype \
|
||
|
php7-dom \
|
||
|
php7-json \
|
||
|
php7-tokenizer \
|
||
|
php7-xmlwriter \
|
||
|
php7-xml \
|
||
|
tzdata
|
||
|
|
||
|
#################################################################################################
|
||
|
### BUILD DEPLOYABLE APP ######################################################
|
||
|
#################################################################################################
|
||
|
FROM base_php AS prep_app
|
||
|
|
||
|
RUN adduser -D builder
|
||
|
RUN apk update && apk add npm composer
|
||
|
|
||
|
USER builder
|
||
|
WORKDIR /sources
|
||
|
# COPY --chown=builder sources/ /sources
|
||
|
|
||
|
# Prepare the building process
|
||
|
RUN npm install && composer install
|
||
|
|
||
|
# Build
|
||
|
RUN npm run build \
|
||
|
&& cd /sources/build \
|
||
|
&& chmod -R a+rX,o-w .
|