hub-cypht (sha-b0d3aec)

Published 2026-10-21 19:21:01 +00:00 by nate

Installation

docker pull git.necloud.us/nate/hub-cypht:sha-b0d3aec
sha256:13ddc869873844e508bdfd78213620569949ee5d0658292c51d8043692d750e2

Images

Digest OS / Arch Size
b8253f0e4a linux/amd64 290 MiB

Image Layers ( linux/amd64)

# debian.sh --arch 'amd64' out/ 'bookworm' '@1791158400'
RUN /bin/sh -c set -eux; { echo 'Package: php*'; echo 'Pin: release *'; echo 'Pin-Priority: -1'; } > /etc/apt/preferences.d/no-debian-php # buildkit
ENV PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends $PHPIZE_DEPS ca-certificates curl xz-utils ; rm -rf /var/lib/apt/lists/* # buildkit
ENV PHP_INI_DIR=/usr/local/etc/php
RUN /bin/sh -c set -eux; mkdir -p "$PHP_INI_DIR/conf.d"; [ ! -d /var/www/html ]; mkdir -p /var/www/html; chown www-data:www-data /var/www/html; chmod 1777 /var/www/html # buildkit
ENV PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
ENV PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
ENV PHP_LDFLAGS=-Wl,-O1 -pie
ENV GPG_KEYS=1198C0117593497A5EC5C199286AF1F9897469DC C28D937575603EB4ABB725861C0779DC5C0A9DE4 AFD8691FDAEDF03BDF6E460563F15A9B715376CA
ENV PHP_VERSION=8.3.35
ENV PHP_URL=https://www.php.net/distributions/php-8.3.35.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.3.35.tar.xz.asc
ENV PHP_SHA256=ff4630fbbbd94359134b7d3c223db59329905bdc4f5a9ef93d257b48e358619a
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends gnupg; rm -rf /var/lib/apt/lists/*; mkdir -p /usr/src; cd /usr/src; curl -fsSL -o php.tar.xz "$PHP_URL"; if [ -n "$PHP_SHA256" ]; then echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; fi; curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; export GNUPGHOME="$(mktemp -d)"; for key in $GPG_KEYS; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; done; gpg --batch --verify php.tar.xz.asc php.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME"; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false # buildkit
COPY docker-php-source /usr/local/bin/ # buildkit
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends libargon2-dev libcurl4-openssl-dev libonig-dev libreadline-dev libsodium-dev libsqlite3-dev libssl-dev libxml2-dev zlib1g-dev ; export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" PHP_BUILD_PROVIDER='https://github.com/docker-library/php' PHP_UNAME='Linux - Docker' ; docker-php-source extract; cd /usr/src/php; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; if [ ! -d /usr/include/curl ]; then ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; fi; case "$gnuArch" in 'i686-linux-'*) export CFLAGS="$CFLAGS -msse2 -mfpmath=sse" CPPFLAGS="$CPPFLAGS -msse2 -mfpmath=sse" ; ;; esac; test "$PHP_INI_DIR" != "${PHP_INI_DIR%/php}"; ./configure --build="$gnuArch" --sysconfdir="${PHP_INI_DIR%/php}" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" --enable-option-checking=fatal --with-mhash --with-pic --enable-mbstring --enable-mysqlnd --with-password-argon2 --with-sodium=shared --with-pdo-sqlite=/usr --with-sqlite3=/usr --with-curl --with-iconv --with-openssl --with-readline --with-zlib --disable-phpdbg --with-pear --with-libdir="lib/$debMultiarch" --disable-cgi --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data ; make -j "$(nproc)"; find -type f -name '*.a' -delete; make install; find /usr/local -type f -perm '/0111' -exec sh -euxc ' strip --strip-all "$@" || : ' -- '{}' + ; make clean; cp -v php.ini-* "$PHP_INI_DIR/"; cd /; docker-php-source delete; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; find /usr/local -type f -executable -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; pecl update-channels; rm -rf /tmp/pear ~/.pearrc; php --version # buildkit
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ # buildkit
RUN /bin/sh -c docker-php-ext-enable opcache # buildkit
RUN /bin/sh -c docker-php-ext-enable sodium # buildkit
ENTRYPOINT ["docker-php-entrypoint"]
WORKDIR /var/www/html
RUN /bin/sh -c set -eux; cd "${PHP_INI_DIR%/php}"; cp -v php-fpm.conf.default php-fpm.conf; cp -v php-fpm.d/www.conf.default php-fpm.d/www.conf; grep -E '^listen = 127.0.0.1:9000' php-fpm.d/www.conf; sed -ri 's/^(listen = 127.0.0.1:9000)/;\1/' php-fpm.d/www.conf; grep -E '^;listen = 127.0.0.1:9000' php-fpm.d/www.conf; { echo '[global]'; echo 'error_log = /proc/self/fd/2'; echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; echo; echo '[www]'; echo '; php-fpm closes STDOUT on startup, so sending logs to /proc/self/fd/1 does not work.'; echo '; https://bugs.php.net/bug.php?id=73886'; echo 'access.log = /proc/self/fd/2'; echo; echo 'clear_env = no'; echo; echo '; Ensure worker stdout and stderr are sent to the main error log.'; echo 'catch_workers_output = yes'; echo 'decorate_workers_output = no'; echo; echo '; default listen address for easy override in later php-fpm.d/*.conf files'; echo 'listen = 9000'; } | tee php-fpm.d/docker.conf; { echo '[global]'; echo 'daemonize = no'; echo; echo '; the [www] ini section below is for backwards compatibility and will be removed in 8.6+'; echo '[www]'; } | tee php-fpm.d/zz-docker.conf; mkdir -p "$PHP_INI_DIR/conf.d"; { echo '; https://github.com/docker-library/php/issues/878#issuecomment-938595965'; echo 'fastcgi.logging = Off'; } > "$PHP_INI_DIR/conf.d/docker-fpm.ini" # buildkit
STOPSIGNAL SIGQUIT
EXPOSE map[9000/tcp:{}]
CMD ["php-fpm"]
WORKDIR /usr/local/share/cypht
ENV DEBIAN_FRONTEND=noninteractive COMPOSER_CACHE_DIR=/tmp/composer_cache COMPOSER_HOME=/tmp/composer_home
RUN /bin/sh -c set -eux && apt-get update && apt-get install -y --no-install-recommends supervisor nginx sqlite3 libfreetype6-dev libpng-dev libjpeg-dev libxml2-dev libzip-dev libpq-dev unzip ca-certificates curl && docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install -j$(nproc) session fileinfo dom xml xmlwriter gd pdo pdo_pgsql pdo_mysql mysqli pgsql soap zip && curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s xdebug redis gnupg memcached ldap && rm -rf /var/lib/apt/lists/* && rm -f /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default && mkdir -p /var/log/php /var/log/supervisord && ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log && ln -sf /dev/stdout /var/log/php/fpm.log && ln -sf /dev/stderr /var/log/php/fpm-error.log && ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini # buildkit
RUN /bin/sh -c printf "[xdebug] \nzend_extension=xdebug.so \nxdebug.mode=debug \nxdebug.client_host=host.docker.internal" > /usr/local/etc/php/conf.d/xdebug.ini # buildkit
RUN /bin/sh -c printf "post_max_size = 60M \nupload_max_filesize = 50M \nopen_basedir = /var/lib/hm3/:/usr/local/share/cypht/:/tmp:/usr/local/bin:/tmp/composer_cache:/tmp/composer_home:/etc" > /usr/local/etc/php/conf.d/cypht.ini # buildkit
RUN /bin/sh -c curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer && composer self-update --2 # buildkit
COPY docker/nginx.conf /etc/nginx/nginx.conf # buildkit
COPY docker/supervisord.conf /etc/supervisord.conf # buildkit
COPY composer.* ./ # buildkit
RUN /bin/sh -c composer install # buildkit
COPY assets/ assets/ # buildkit
COPY config/ config/ # buildkit
COPY language/ language/ # buildkit
COPY lib/ lib/ # buildkit
COPY modules/ modules/ # buildkit
COPY scripts/ scripts/ # buildkit
COPY database/ database/ # buildkit
COPY third_party/ third_party/ # buildkit
COPY index.php index.php # buildkit
COPY docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh # buildkit
RUN /bin/sh -c chmod +x /usr/local/bin/docker-entrypoint.sh # buildkit
COPY .env.example .env # buildkit
HEALTHCHECK {Test:[CMD-SHELL curl --fail http://localhost || exit 1] Interval:0s Timeout:0s StartPeriod:0s StartInterval:0s Retries:0}
EXPOSE [80/tcp]
ENTRYPOINT ["docker-entrypoint.sh"]
COPY nginx.conf /etc/nginx/nginx.conf # buildkit
RUN /bin/sh -c sed -i "s#'scope' => 'wl.imap'#'scope' => 'https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send offline_access'#" /usr/local/share/cypht/modules/nux/services.php && [ "$(grep -c 'IMAP.AccessAsUser.All' /usr/local/share/cypht/modules/nux/services.php)" = 2 ] # buildkit
COPY entrypoint.sh /hub-entrypoint.sh # buildkit
RUN /bin/sh -c mkdir -p /var/lib/hm3 # buildkit
ENV DB_CONNECTION_TYPE=host DB_DRIVER=sqlite DB_NAME=/var/lib/hm3/cypht.sqlite SESSION_TYPE=PHP AUTH_TYPE=DB USER_CONFIG_TYPE=DB COOKIE_PATH=/webmail/ ALLOW_LONG_SESSION=true LONG_SESSION_LIFETIME=30
VOLUME [/var/lib/hm3]
ENTRYPOINT ["/hub-entrypoint.sh"]

Labels

Key Value
org.opencontainers.image.created 2026-10-21T19:16:58.591Z
org.opencontainers.image.description
org.opencontainers.image.licenses
org.opencontainers.image.revision b0d3aec811067098766c09c1cf2c1c64323e8097
org.opencontainers.image.source https://git.necloud.us/nate/hub
org.opencontainers.image.title hub
org.opencontainers.image.url https://git.necloud.us/nate/hub
org.opencontainers.image.version latest
Details
Container
2026-10-21 19:21:01 +00:00
0
OCI / Docker
Versions (7) View all
sha-b0d3aec 2026-10-21
latest 2026-10-21
sha-fc0ae05 2026-10-21
sha-bfd3796 2026-10-21
sha-522fdba 2026-10-21