Skip to content

Commit

Permalink
Switch to 'php_composer_install' build helper
Browse files Browse the repository at this point in the history
  • Loading branch information
PhrozenByte committed Nov 28, 2023
1 parent 3b0bb8a commit 7fbfb1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
25 changes: 1 addition & 24 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,11 @@ else
fi

pkg_install "$BUILD_CONTAINER" \
curl \
gnupg \
git \
python3 \
npm

echo + "mkdir <builder> …/usr/src/composer" >&2
mkdir "$BUILD_MOUNT/usr/src/composer"

cmd buildah run "$BUILD_CONTAINER" -- \
curl -L -f -o "/usr/src/composer/composer.phar" "$COMPOSER_PHAR"

cmd buildah run "$BUILD_CONTAINER" -- \
curl -L -f -o "/usr/src/composer/composer.phar.asc" "$COMPOSER_PHAR_ASC"

for COMPOSER_GPG_KEY in $COMPOSER_GPG_KEYS; do
cmd buildah run "$BUILD_CONTAINER" -- \
gpg --keyserver "keyserver.ubuntu.com" --recv-keys "$COMPOSER_GPG_KEY"
done

cmd buildah run "$BUILD_CONTAINER" -- \
gpg --verify "/usr/src/composer/composer.phar.asc" "/usr/src/composer/composer.phar"

cmd buildah run "$BUILD_CONTAINER" -- \
mv "/usr/src/composer/composer.phar" "/usr/local/bin/composer"

cmd buildah run "$BUILD_CONTAINER" -- \
chmod +x "/usr/local/bin/composer"
php_composer_install "$BUILD_CONTAINER"

cmd buildah config \
--env COMPOSER_ALLOW_SUPERUSER=1 \
Expand Down
4 changes: 0 additions & 4 deletions container.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ TAGS="${TAGS:-latest}"
GIT_REPO="https://github.com/PhrozenByte/selfoss.git"
GIT_REF="refs/heads/master"

COMPOSER_PHAR="https://getcomposer.org/download/latest-stable/composer.phar"
COMPOSER_PHAR_ASC="https://getcomposer.org/download/latest-stable/composer.phar.asc"
COMPOSER_GPG_KEYS="161DFBE342889F01DDAC4E61CBB3D576F2A0946F"

BASE_IMAGE="ghcr.io/sgsgermany/php-fpm:v8.2"

0 comments on commit 7fbfb1e

Please sign in to comment.