From 6461527fefb938539907a8c1ba0e840a2f93cb4c Mon Sep 17 00:00:00 2001 From: Austin Best Date: Sun, 17 Nov 2024 18:38:06 -0500 Subject: [PATCH] Build with memcache --- Dockerfile | 13 +++++++++++-- .../svc-memcached/dependencies.d/init-services | 0 root/etc/s6-overlay/s6-rc.d/svc-memcached/run | 4 ++++ root/etc/s6-overlay/s6-rc.d/svc-memcached/type | 1 + .../s6-rc.d/user/contents.d/svc-memcached | 0 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-memcached/dependencies.d/init-services create mode 100755 root/etc/s6-overlay/s6-rc.d/svc-memcached/run create mode 100644 root/etc/s6-overlay/s6-rc.d/svc-memcached/type create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-memcached diff --git a/Dockerfile b/Dockerfile index d6cc6d6..9108d7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,17 @@ RUN \ grep -qxF 'clear_env = no' /etc/php82/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php82/php-fpm.d/www.conf && \ echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php82/php-fpm.conf - # install sqlite3 -RUN apk add --no-cache php82-sqlite3 +RUN echo '@community http://dl-cdn.alpinelinux.org/alpine/v3.18/community/' >> /etc/apk/repositories && \ + apk update && \ + apk upgrade && \ + apk --no-cache add \ + # Database + php82-sqlite3 \ + # Memcache + memcached \ + php82-pecl-memcached \ + php82-pecl-memcache@community \ + php82-pecl-memcached@community # healthchecks HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --start-interval=10s --retries=5 \ diff --git a/root/etc/s6-overlay/s6-rc.d/svc-memcached/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-memcached/dependencies.d/init-services new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-memcached/run b/root/etc/s6-overlay/s6-rc.d/svc-memcached/run new file mode 100755 index 0000000..514c67a --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-memcached/run @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +exec memcached -u abc \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/svc-memcached/type b/root/etc/s6-overlay/s6-rc.d/svc-memcached/type new file mode 100644 index 0000000..1780f9f --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-memcached/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-memcached b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-memcached new file mode 100644 index 0000000..e69de29