Answer the question
In order to leave comments, you need to log in
How to build a frontend based on a docker image?
stages:
- dockerize
- update-modules
- build
dockerize:
<<: *common
<<: *shared
stage: dockerize
script:
- docker build --build-arg DOCKER_REGISTRY -t ${DOCKER_REGISTRY}/${APP_NAME}:${VERSION} . -f ./docker/php-fpm/Dockerfile
- docker push ${DOCKER_REGISTRY}/${APP_NAME}:${VERSION}
when: manual
build-frontend:
<<: *rules-default
<<: *common
<<: *docker
image: ${DOCKER_REGISTRY}/${APP_NAME}:${VERSION}
stage: build
script: npm run prod
ARG DOCKER_REGISTRY
FROM $DOCKER_REGISTRY/php:7.4.7-fpm
USER root
RUN apt -y update
RUN apt -y --no-install-recommends install unzip wget curl libaio1 openssl
WORKDIR /app
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN composer install --no-dev && rm ./composer-setup.php
RUN npm install [email protected] -g
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question