🐛 Update entrypoint.sh and functions library from current template 🐛

Stale copies called __initialize_default_templates, __initialize_config_dir,
and __initialize_data_dir which are not in the old functions library,
causing container startup failures. Replaced with current template
versions (202606041210-git) which no longer call those missing functions.
- rootfs/usr/local/bin/entrypoint.sh: update to current template
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: update to current template

.claude/settings.local.json
Dockerfile
.env.scripts
rootfs/usr/local/bin/entrypoint.sh
This commit is contained in:
2026-06-05 18:24:48 -04:00
parent 056270d60c
commit 36854be70b
4 changed files with 19 additions and 43 deletions
+2 -1
View File
@@ -4,7 +4,8 @@
"Bash(script-lint *)", "Bash(script-lint *)",
"WebFetch(domain:docs.gitea.com)", "WebFetch(domain:docs.gitea.com)",
"Bash(cp /tmp/templates/gitea/rootfs/usr/local/bin/entrypoint.sh /root/Projects/github/casjaysdevdocker/gitea/rootfs/usr/local/bin/entrypoint.sh)", "Bash(cp /tmp/templates/gitea/rootfs/usr/local/bin/entrypoint.sh /root/Projects/github/casjaysdevdocker/gitea/rootfs/usr/local/bin/entrypoint.sh)",
"Bash(cp /tmp/templates/gitea/rootfs/usr/local/etc/docker/functions/entrypoint.sh /root/Projects/github/casjaysdevdocker/gitea/rootfs/usr/local/etc/docker/functions/entrypoint.sh)" "Bash(cp /tmp/templates/gitea/rootfs/usr/local/etc/docker/functions/entrypoint.sh /root/Projects/github/casjaysdevdocker/gitea/rootfs/usr/local/etc/docker/functions/entrypoint.sh)",
"Bash(gen-dockerfile --help)"
] ]
} }
} }
+5 -8
View File
@@ -1,10 +1,10 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511290804-git ##@Version : 202606051822-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : WTFPL
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 08:04:00 AM EST 2025 # @@Created : Fri Jun 5 06:22:56 PM EDT 2026
# @@File : .env.scripts # @@File : .env.scripts
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# @@Changelog : newScript # @@Changelog : newScript
@@ -72,12 +72,9 @@ NODE_MANAGER="system"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Default directories # Default directories
WWW_ROOT_DIR="/usr/local/share/httpd/default" WWW_ROOT_DIR="/usr/local/share/httpd/default"
DEFAULT_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="cgroup-tools fuse-overlayfs btrfs-progs xfsprogs e2fsprogs e2fsprogs-extra zfs git ip6tables iptables openssl pigz shadow-uidmap xz docker openssh" ENV_PACKAGES="cgroup-tools fuse-overlayfs btrfs-progs xfsprogs e2fsprogs e2fsprogs-extra zfs git ip6tables iptables openssl pigz shadow-uidmap xz docker openssh"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+9 -31
View File
@@ -1,14 +1,10 @@
# Docker image for gitea using the alpine template # Docker image for gitea using the alpine template
ARG IMAGE_NAME="gitea" ARG IMAGE_NAME="gitea"
ARG PHP_SERVER="gitea" ARG PHP_SERVER="gitea"
ARG BUILD_DATE="202511290804" ARG BUILD_DATE="202606051822"
ARG LANGUAGE="en_US.UTF-8" ARG LANGUAGE="en_US.UTF-8"
ARG TIMEZONE="America/New_York" ARG TIMEZONE="America/New_York"
ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG WWW_ROOT_DIR="/usr/local/share/httpd/default"
ARG DEFAULT_FILE_DIR="/usr/local/share/template-files"
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
ARG PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ARG PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ARG USER="root" ARG USER="root"
@@ -42,10 +38,6 @@ ARG EXPOSE_PORTS
ARG BUILD_VERSION ARG BUILD_VERSION
ARG IMAGE_VERSION ARG IMAGE_VERSION
ARG WWW_ROOT_DIR ARG WWW_ROOT_DIR
ARG DEFAULT_FILE_DIR
ARG DEFAULT_DATA_DIR
ARG DEFAULT_CONF_DIR
ARG DEFAULT_TEMPLATE_DIR
ARG DISTRO_VERSION ARG DISTRO_VERSION
ARG NODE_VERSION ARG NODE_VERSION
ARG NODE_MANAGER ARG NODE_MANAGER
@@ -54,7 +46,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG PATH ARG PATH
ARG PACK_LIST="curl ca-certificates fuse-overlayfs btrfs-progs xfsprogs e2fsprogs e2fsprogs-extra zfs git ip6tables iptables openssl pigz shadow-uidmap xz docker openssh cgroup-tools " ARG PACK_LIST="cgroup-tools fuse-overlayfs btrfs-progs xfsprogs e2fsprogs e2fsprogs-extra zfs git ip6tables iptables openssl pigz shadow-uidmap xz docker openssh "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
@@ -72,17 +64,12 @@ COPY ./rootfs/. /
RUN set -e; \ RUN set -e; \
echo "Updating the system and ensuring bash is installed"; \ echo "Updating the system and ensuring bash is installed"; \
pkmgr update;pkmgr install bash pkmgr update;pkmgr install bash ca-certificates; \
update-ca-certificates
RUN set -e; \ RUN set -e; \
echo "Setting up prerequisites"; \ echo "Setting up prerequisites"; \
apk --no-cache add bash; \ true
SH_CMD="$(which sh 2>/dev/null||command -v sh 2>/dev/null)"; \
BASH_CMD="$(which bash 2>/dev/null||command -v bash 2>/dev/null)"; \
[ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/bin/sh" || true; \
[ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/usr/bin/sh" || true; \
[ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && symlink "$BASH_CMD" "$SH_CMD" || true; \
[ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true
ENV SHELL="/bin/bash" ENV SHELL="/bin/bash"
SHELL [ "/bin/bash", "-c" ] SHELL [ "/bin/bash", "-c" ]
@@ -91,18 +78,13 @@ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
RUN echo "Initializing the system"; \ RUN echo "Initializing the system"; \
$SHELL_OPTS; \ $SHELL_OPTS; \
mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \ mkdir -p "/root/docker/setup" "/etc/profile.d"; \
if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";/root/docker/setup/00-init.sh||{ echo "Failed to execute /root/docker/setup/00-init.sh" >&2 && exit 10; };echo "Done running the init script";fi; \ if [ -f "/root/docker/setup/00-init.sh" ];then echo "Running the init script";/root/docker/setup/00-init.sh||{ echo "Failed to execute /root/docker/setup/00-init.sh" >&2 && exit 10; };echo "Done running the init script";fi; \
echo "" echo ""
RUN echo "Creating and editing system files "; \ RUN echo "Creating and editing system files "; \
$SHELL_OPTS; \ $SHELL_OPTS; \
rm -Rf "/etc/apk/repositories"; \ [ -f "/root/.profile" ] || touch "/root/.profile"; \
[ "$DISTRO_VERSION" = "latest" ] && DISTRO_VERSION="edge";[ "$DISTRO_VERSION" = "edge" ] || DISTRO_VERSION="v${DISTRO_VERSION}"; \
echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/main" >>"/etc/apk/repositories"; \
echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/community" >>"/etc/apk/repositories"; \
if [ "${DISTRO_VERSION}" = "edge" ]; then echo "http://dl-cdn.alpinelinux.org/alpine/${DISTRO_VERSION}/testing" >>"/etc/apk/repositories";fi; \
apk update; apk upgrade --no-cache; \
if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \ if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \
echo "" echo ""
@@ -146,7 +128,7 @@ RUN echo "Updating system files "; \
RUN echo "Custom Settings"; \ RUN echo "Custom Settings"; \
$SHELL_OPTS; \ $SHELL_OPTS; \
echo "" echo ""
RUN echo "Setting up users and scripts "; \ RUN echo "Setting up users and scripts "; \
$SHELL_OPTS; \ $SHELL_OPTS; \
@@ -163,7 +145,7 @@ RUN echo "Setting OS Settings "; \
RUN echo "Custom Applications"; \ RUN echo "Custom Applications"; \
$SHELL_OPTS; \ $SHELL_OPTS; \
echo "" echo ""
RUN echo "Running custom commands"; \ RUN echo "Running custom commands"; \
if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom.sh" && exit 10; };echo "Done running the custom script";fi; \ if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom.sh" && exit 10; };echo "Done running the custom script";fi; \
@@ -205,10 +187,6 @@ ARG BUILD_VERSION
ARG IMAGE_VERSION ARG IMAGE_VERSION
ARG GIT_COMMIT ARG GIT_COMMIT
ARG WWW_ROOT_DIR ARG WWW_ROOT_DIR
ARG DEFAULT_FILE_DIR
ARG DEFAULT_DATA_DIR
ARG DEFAULT_CONF_DIR
ARG DEFAULT_TEMPLATE_DIR
ARG DISTRO_VERSION ARG DISTRO_VERSION
ARG NODE_VERSION ARG NODE_VERSION
ARG NODE_MANAGER ARG NODE_MANAGER
+3 -3
View File
@@ -7,9 +7,9 @@
# @@License : WTFPL # @@License : WTFPL
# @@ReadME : entrypoint.sh --help # @@ReadME : entrypoint.sh --help
# @@Copyright : Copyright: (c) 2026 Jason Hempstead, Casjays Developments # @@Copyright : Copyright: (c) 2026 Jason Hempstead, Casjays Developments
# @@Created : Friday, Jun 05, 2026 17:54 EDT # @@Created : Friday, Jun 05, 2026 18:14 EDT
# @@File : entrypoint.sh # @@File : entrypoint.sh
# @@Description : Entrypoint file for gitea # @@Description : Entrypoint file for alpine
# @@Changelog : New script # @@Changelog : New script
# @@TODO : Better documentation # @@TODO : Better documentation
# @@Other : # @@Other :
@@ -39,7 +39,7 @@ PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options # Set bash options
SCRIPT_FILE="$0" SCRIPT_FILE="$0"
CONTAINER_NAME="gitea" CONTAINER_NAME="alpine"
SCRIPT_NAME="${SCRIPT_FILE##*/}" SCRIPT_NAME="${SCRIPT_FILE##*/}"
CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}" CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -