MaketRandevu/docker/build/Dockerfile

43 lines
985 B
Docker
Raw Permalink Normal View History

2023-12-22 23:44:48 +03:00
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 .