Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 3073f30

Browse files
committed
Fixed composer build breaking
1 parent 16d9b56 commit 3073f30

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.env.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ CHANGE_SOURCE=false
9898

9999
### APP PHP #################################################
100100

101-
PHP_VERSION=8-fpm
101+
PHP_VERSION=8.0-fpm
102102

103103

104104
### MYSQL #################################################

docker-compose/build/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# SPDX-License-Identifier: MIT
44
#
55

6-
FROM php:fpm AS inteliotportal-build
6+
ARG PHP_VERSION=fpm
7+
FROM php:${PHP_VERSION} AS inteliotportal-build
78

89
# Install PHP and composer dependencies
910
RUN apt update && apt install -qq -y \

scripts/run.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ ENV_DIR="$DATA_DIR/env"
2424
DOCKER_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../docker-compose" && pwd)"
2525
PORTAL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
2626

27+
# Ensure net-tools exists
28+
sudo apt-get update -qq >/dev/null
29+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq net-tools >/dev/null
30+
2731
# Determine default host machine IP address
2832
NET_INTERFACE=$(route | grep '^default' | grep -o '[^ ]*$')
2933
IP_ADDRESS=$(ip -4 addr show ${NET_INTERFACE} | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sed -e "s/^[[:space:]]*//" | head -n 1)
@@ -52,7 +56,9 @@ function install() {
5256

5357
dockerComposeVolumes
5458

55-
docker build --no-cache -t inteliotportal-build --build-arg HOSTNAME=$DOMAIN \
59+
source ../.env.staging
60+
61+
docker build --no-cache -t inteliotportal-build --build-arg HOSTNAME=$DOMAIN --build-arg PHP_VERSION \
5662
-f $DOCKER_DIR/build/Dockerfile $PORTAL_DIR
5763

5864
docker run --rm --name setup -v $DATA_DIR:/iotportaldata --env-file $ENV_DIR/uid.env inteliotportal-build

0 commit comments

Comments
 (0)