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
96
96
CHANGE_SOURCE = false
97
97
98
98
99
+ # ## COMPOSER #################################################
100
+
101
+ COMPOSER_VERSION = 2.2.3
102
+
103
+
99
104
# ## APP PHP #################################################
100
105
101
106
PHP_VERSION = 8.0-fpm
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ services:
10
10
context : ./
11
11
dockerfile : docker-compose/app/Dockerfile.staging
12
12
args :
13
+ - COMPOSER_VERSION=${COMPOSER_VERSION}
13
14
- PHP_VERSION=${PHP_VERSION}
14
15
- LOCAL_UID=${LOCAL_UID}
15
16
- LOCAL_GID=${LOCAL_GID}
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: MIT
4
4
#
5
5
6
+ ARG COMPOSER_VERSION=latest
7
+
6
8
ARG PHP_VERSION=fpm
9
+
10
+ FROM composer:${COMPOSER_VERSION} AS inteliotportal-composer
11
+
7
12
FROM php:${PHP_VERSION}
8
13
9
14
ARG LOCAL_UID=65534
@@ -43,8 +48,8 @@ RUN pecl install -o -f redis \
43
48
44
49
RUN rm -r /var/www/*
45
50
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
48
53
49
54
COPY --from=inteliotportal-build --chown=$LOCAL_UID:$LOCAL_GID /var/www /var/www/
50
55
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: MIT
4
4
#
5
5
6
+ ARG COMPOSER_VERSION=latest
7
+
6
8
ARG PHP_VERSION=fpm
9
+
10
+ FROM composer:${COMPOSER_VERSION} AS inteliotportal-composer
11
+
7
12
FROM php:${PHP_VERSION} AS inteliotportal-build
8
13
9
14
# Install PHP and composer dependencies
@@ -35,8 +40,8 @@ RUN pecl install -o -f redis \
35
40
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip \
36
41
&& docker-php-ext-enable redis
37
42
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
40
45
41
46
# Install NodeJS
42
47
RUN 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() {
56
56
57
57
dockerComposeVolumes
58
58
59
- source ../.env.staging
59
+ source ../.env.staging && export COMPOSER_VERSION PHP_VERSION
60
60
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
65
63
66
64
docker run --rm --name setup -v $DATA_DIR :/iotportaldata --env-file $ENV_DIR /uid.env inteliotportal-build
67
65
You can’t perform that action at this time.
0 commit comments