This repository was archived by the owner on Jan 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +23
-9
lines changed
Expand file tree Collapse file tree 5 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ MQTT_TLS_CLIENT_CERTIFICATE_KEY_PASSPHRASE=null
9696CHANGE_SOURCE = false
9797
9898
99+ # ## COMPOSER #################################################
100+
101+ COMPOSER_VERSION = 2.2.3
102+
103+
99104# ## APP PHP #################################################
100105
101106PHP_VERSION = 8.0-fpm
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ services:
1010 context : ./
1111 dockerfile : docker-compose/app/Dockerfile.staging
1212 args :
13+ - COMPOSER_VERSION=${COMPOSER_VERSION}
1314 - PHP_VERSION=${PHP_VERSION}
1415 - LOCAL_UID=${LOCAL_UID}
1516 - LOCAL_GID=${LOCAL_GID}
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: MIT
44#
55
6+ ARG COMPOSER_VERSION=latest
7+
68ARG PHP_VERSION=fpm
9+
10+ FROM composer:${COMPOSER_VERSION} AS inteliotportal-composer
11+
712FROM php:${PHP_VERSION}
813
914ARG LOCAL_UID=65534
@@ -43,8 +48,8 @@ RUN pecl install -o -f redis \
4348
4449RUN rm -r /var/www/*
4550
46- # Get latest Composer TODO: remove in future
47- COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
51+ # Get Composer TODO: remove in future
52+ COPY --from=inteliotportal- composer /usr/bin/composer /usr/bin/composer
4853
4954COPY --from=inteliotportal-build --chown=$LOCAL_UID:$LOCAL_GID /var/www /var/www/
5055
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: MIT
44#
55
6+ ARG COMPOSER_VERSION=latest
7+
68ARG PHP_VERSION=fpm
9+
10+ FROM composer:${COMPOSER_VERSION} AS inteliotportal-composer
11+
712FROM php:${PHP_VERSION} AS inteliotportal-build
813
914# Install PHP and composer dependencies
@@ -35,8 +40,8 @@ RUN pecl install -o -f redis \
3540 && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip \
3641 && docker-php-ext-enable redis
3742
38- # Get latest Composer
39- COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
43+ # Get Composer
44+ COPY --from=inteliotportal- composer /usr/bin/composer /usr/bin/composer
4045
4146# Install NodeJS
4247RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
Original file line number Diff line number Diff line change @@ -56,12 +56,10 @@ function install() {
5656
5757 dockerComposeVolumes
5858
59- source ../.env.staging
59+ source ../.env.staging && export COMPOSER_VERSION PHP_VERSION
6060
61- export PHP_VERSION
62-
63- docker build --no-cache -t inteliotportal-build --build-arg HOSTNAME=$DOMAIN --build-arg PHP_VERSION \
64- -f $DOCKER_DIR /build/Dockerfile $PORTAL_DIR
61+ docker build --no-cache -t inteliotportal-build --build-arg HOSTNAME=$DOMAIN --build-arg COMPOSER_VERSION \
62+ --build-arg PHP_VERSION -f $DOCKER_DIR /build/Dockerfile $PORTAL_DIR
6563
6664 docker run --rm --name setup -v $DATA_DIR :/iotportaldata --env-file $ENV_DIR /uid.env inteliotportal-build
6765
You can’t perform that action at this time.
0 commit comments