From aeb706b5afa2100a8346cfbb06542f8526608afe Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Sun, 14 Sep 2025 22:10:04 -0500 Subject: [PATCH] build: creates base image to speed up build times --- bash/build_base.sh | 7 +++++++ docker/Dockerfile.base | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 bash/build_base.sh create mode 100644 docker/Dockerfile.base diff --git a/bash/build_base.sh b/bash/build_base.sh new file mode 100755 index 0000000..0088453 --- /dev/null +++ b/bash/build_base.sh @@ -0,0 +1,7 @@ +# torsearch-app is built from this base, and torsearch-worker & torsearch-scheduler are built from torsearch-app +# This image is used to speed up build times +export FRANKENPHP_TAG=php8.4 + +docker buildx build --platform=linux/amd64 -f docker/Dockerfile.base -t code.caldwell.digital/home/torsearch-base:${FRANKENPHP_TAG} -t code.caldwell.digital/home/torsearch-base:latest --build-arg "FRANKENPHP_TAG=${FRANKENPHP_TAG}" . +docker push code.caldwell.digital/home/torsearch-base:${FRANKENPHP_TAG} +docker push code.caldwell.digital/home/torsearch-base:latest diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base new file mode 100644 index 0000000..4d696e2 --- /dev/null +++ b/docker/Dockerfile.base @@ -0,0 +1,16 @@ +ARG FRANKENPHP_TAG + +FROM dunglas/frankenphp:${FRANKENPHP_TAG} + +ENV SERVER_NAME=":80" +ENV CADDY_GLOBAL_OPTIONS="auto_https off" +ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime" + +RUN install-php-extensions \ + pdo_mysql \ + gd \ + intl \ + zip \ + opcache && \ + apt install -y wget && \ + apt clean && apt autoremove