Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .git-config/hooks/pre-commit

This file was deleted.

17 changes: 13 additions & 4 deletions .github/workflows/workflow-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ on:
required: true
type: string
default: ''
base-ubuntu-version:
base-os-flavor:
required: false
type: string
default: 'ubuntu-22.04'
default: 'ubuntu'
base-os-version:
required: false
type: string
default: '22.04'
tag-prefix:
required: true
type: string
default: 'beta-'
php-variation:
required: true
type: string
php-version:
required: true
type: string

jobs:
docker-publish:
Expand Down Expand Up @@ -52,8 +59,10 @@ jobs:
with:
build-args: |
UPSTREAM_CHANNEL=${{ inputs.upstream-channel-prefix }}
BASE_OS_VERSION=${{ inputs.base-ubuntu-version }}
context: dist/${{ matrix.php-version }}/${{ inputs.php-variation }}/.
BASE_OS_FLAVOR=${{ inputs.base-os-flavor }}
BASE_OS_VERSION=${{ inputs.base-os-version }}
PHP_VERSION=${{ inputs.php-version }}
context: src/${{ inputs.php-variation }}/.
platforms: |
linux/amd64
linux/arm/v7
Expand Down
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# Contribution guide
Thanks for your interest in contributing to this project!

As stated in the README, there are a lot of dependencies on these images, so please understand that it can make it complicated on merging your pull request.
As stated in the README, there are a lot of down-stream dependencies on these images, so please understand that it can make it complicated on merging your pull request.

We'd love to have your help, but it might be best to explain your intentions first before contributing.

# Project dependencies
You must have these installed on your system.
* Docker (container system): https://www.docker.com/products/docker-desktop
* Yasha (templating engine): https://github.com/kblomqvist/yasha

# How things work
1. All templates are stored in the `/src` folder
1. I have a Git "Pre-Commit" hook that runs `build.sh`
1. `build.sh` copies the templates and applies the templates with [yasha](https://github.com/kblomqvist/yasha)
1. All generated files are then stored in the `/dist` folder
1. Github Actions will read the generated files and build images from the generated files
1. All files are stored in the `/src` folder
1. Github Actions will automatically build and deploy the images

# Running things locally

To run a build, simply run `./dev.sh`. This will automatically build the beta images on your local machine.
To run a build, simply run `./dev.sh`. This will automatically build the beta images on your local machine. If you want to only build a specific version, you pass it a version you want to build (example: `./dev.sh 8.1`)

#### Viewing the images
After running the build, you should be able to run `docker images` to see all available images on your machine. Everything built with `./dev.sh` will be tagged `serversideup/php:beta-*`.
Expand Down
61 changes: 0 additions & 61 deletions build.sh

This file was deleted.

50 changes: 38 additions & 12 deletions dev.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
#!/bin/bash

##########################
# Bash settings

#exit on error
set -e

##########################
# Environment Settings
DEV_UPSTREAM_CHANNEL="beta-"
DEV_BASE_OS_VERSION="ubuntu-22.04"
DEV_BASE_OS_FLAVOR="ubuntu"
DEV_BASE_OS_VERSION="22.04"

##########################
# Execute other build script
# UI Colors
function ui_set_yellow {
printf $'\033[0;33m'
}

# Run a build and include all variables
source ./build.sh
function ui_set_green {
printf $'\033[0;32m'
}

function ui_set_red {
printf $'\033[0;31m'
}

function ui_reset_colors {
printf "\e[0m"
}

# Script Configurations
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

##########################
# Set versions to build
if [ $# -eq 0 ]; then
# Set versions
phpVersions=(
7.4
8.0
8.1
)
else
phpVersions=$1
fi

##########################
# Functions
Expand All @@ -24,15 +49,16 @@ function build (){
label=$(echo $1 | tr '[:lower:]' '[:upper:]')
ui_set_yellow && echo "⚡️ Running build for $label - ${2} ..." && ui_reset_colors

# Commenting out Buildx because it does not support multi-arch images locally, yet
#docker buildx build --build-arg UPSTREAM_CHANNEL="$upstream_channel_setting" --platform linux/amd64,linux/arm64 -t "${DEVELOPMENT_REPO_URL}/php:${2}-$1" --push $OUTPUT_DIR/$2/$1/

# Use "docker build"
docker build \
--build-arg UPSTREAM_CHANNEL="${DEV_UPSTREAM_CHANNEL}" \
--build-arg BASE_OS_FLAVOR="${DEV_BASE_OS_FLAVOR}" \
--build-arg BASE_OS_VERSION="${DEV_BASE_OS_VERSION}" \
--build-arg PHP_VERSION="${2}" \
-t "serversideup/php:beta-${2}-$1" \
$OUTPUT_DIR/$2/$1/
$SCRIPT_DIR/src/$1/

ui_set_green && echo "✅ Build completed for $label - ${2} ..." && ui_reset_colors
}

function build_versions {
Expand Down
85 changes: 0 additions & 85 deletions dist/7.4/cli/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions dist/7.4/cli/README.md

This file was deleted.

1 change: 0 additions & 1 deletion dist/7.4/cli/etc/s6-overlay/s6-rc.d/runas-user/type

This file was deleted.

1 change: 0 additions & 1 deletion dist/7.4/cli/etc/s6-overlay/s6-rc.d/runas-user/up

This file was deleted.

Empty file.
41 changes: 0 additions & 41 deletions dist/7.4/cli/etc/s6-overlay/scripts/runas-user

This file was deleted.

Loading