Skip to content

Commit 8943681

Browse files
authored
Add better S6 Overlay versioning support (#174)
* Improved development script for versions * Allow S6 Overlay version to be st * Removed redundant inputs
1 parent fa53135 commit 8943681

File tree

3 files changed

+16
-22
lines changed

3 files changed

+16
-22
lines changed

.github/workflows/service_docker-build-and-publish.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ on:
55
required: true
66
type: string
77
default: ''
8-
base-os-flavor:
9-
required: false
10-
type: string
11-
default: 'ubuntu'
12-
base-os-version:
13-
required: false
14-
type: string
15-
default: '22.04'
168
tag-prefix:
179
required: true
1810
type: string
@@ -96,8 +88,6 @@ jobs:
9688
with:
9789
build-args: |
9890
UPSTREAM_CHANNEL=${{ inputs.upstream-channel-prefix }}
99-
BASE_OS_FLAVOR=${{ inputs.base-os-flavor }}
100-
BASE_OS_VERSION=${{ inputs.base-os-version }}
10191
PHP_VERSION=${{ matrix.php-version }}
10292
context: src/${{ inputs.php-variation }}/.
10393
platforms: |

dev.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ set -e
66
##########################
77
# Environment Settings
88
DEV_UPSTREAM_CHANNEL="beta-"
9-
DEV_BASE_OS_FLAVOR="ubuntu"
10-
DEV_BASE_OS_VERSION="22.04"
119

1210
# UI Colors
1311
function ui_set_yellow {
@@ -33,12 +31,19 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
3331
# Set versions to build
3432
if [ $# -eq 0 ]; then
3533
# Set versions
36-
phpVersions=(
37-
7.4
38-
8.0
39-
8.1
40-
8.2
41-
)
34+
phpVersions=()
35+
36+
echo "Running build for these PHP versions..."
37+
# Loop through each .txt file in the current directory
38+
for file in src/cli/php-version-packages/*.txt; do
39+
# Trim the extension off the filename and add it to the array
40+
phpVersion=$(basename -- "$file")
41+
phpVersion="${phpVersion%.*}"
42+
phpVersions+=("$phpVersion")
43+
44+
# Print the filename without the extension
45+
echo "$phpVersion"
46+
done
4247
else
4348
phpVersions=$1
4449
fi
@@ -53,8 +58,6 @@ function build (){
5358
# Use "docker build"
5459
docker build \
5560
--build-arg UPSTREAM_CHANNEL="${DEV_UPSTREAM_CHANNEL}" \
56-
--build-arg BASE_OS_FLAVOR="${DEV_BASE_OS_FLAVOR}" \
57-
--build-arg BASE_OS_VERSION="${DEV_BASE_OS_VERSION}" \
5861
--build-arg PHP_VERSION="${2}" \
5962
-t "serversideup/php:beta-${2}-$1" \
6063
$SCRIPT_DIR/src/$1/

src/cli/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARG UPSTREAM_CHANNEL=''
22
ARG BASE_OS_FLAVOR='ubuntu'
33
ARG BASE_OS_VERSION='22.04'
4-
ARG BASE_IMAGE="serversideup/s6-overlay:${UPSTREAM_CHANNEL}${BASE_OS_FLAVOR}-${BASE_OS_VERSION}"
4+
ARG S6_OVERLAY_VERSION='v3.1.2.1'
5+
ARG BASE_IMAGE="serversideup/s6-overlay:${UPSTREAM_CHANNEL}${BASE_OS_FLAVOR}-${BASE_OS_VERSION}-${S6_OVERLAY_VERSION}"
56

67
# add ondrej repository
78
FROM ${BASE_IMAGE} as repo-config
@@ -14,7 +15,7 @@ RUN apt-get update \
1415
FROM ${BASE_IMAGE}
1516
LABEL maintainer="Jay Rogers (@jaydrogers)"
1617

17-
ARG PHP_VERSION='8.1'
18+
ARG PHP_VERSION='8.2'
1819

1920
ENV BUILD_PHP_VERSION=$PHP_VERSION \
2021
DEBIAN_FRONTEND=noninteractive \

0 commit comments

Comments
 (0)