🔧 Update scripts, remove certbot, add CA cert update 🔧

Update all container scripts to 202605241245-git, remove certbot from
all package lists, and add CA certificate update step after install.
- .env.scripts*: remove certbot from ENV_PACKAGES (all 7 version files)
- Dockerfile*: remove certbot from PACK_LIST (all 7 version Dockerfiles)
- rootfs/root/docker/setup/00-init.sh: updated to latest template
- rootfs/root/docker/setup/01-system.sh: updated to latest template
- rootfs/root/docker/setup/02-packages.sh: add update-ca-certificates/update-ca-trust step
- rootfs/root/docker/setup/03-files.sh: updated to latest template
- rootfs/root/docker/setup/04-users.sh: updated to latest template
- rootfs/root/docker/setup/05-custom.sh: updated to latest template
- rootfs/root/docker/setup/06-post.sh: updated to latest template
- rootfs/root/docker/setup/07-cleanup.sh: updated to latest template
- rootfs/usr/local/bin/entrypoint.sh: updated to 202605241245-git
- rootfs/usr/local/bin/pkmgr: updated to 202605241245-git
- rootfs/usr/local/etc/docker/functions/entrypoint.sh: updated to 202605241245-git

Dockerfile
Dockerfile.18.04
Dockerfile.20.04
Dockerfile.22.04
Dockerfile.24.04
Dockerfile.24.10
Dockerfile.26.04
.env.scripts
.env.scripts.18.04
.env.scripts.20.04
.env.scripts.22.04
.env.scripts.24.04
.env.scripts.24.10
.env.scripts.26.04
rootfs/root/docker/setup/00-init.sh
rootfs/root/docker/setup/01-system.sh
rootfs/root/docker/setup/02-packages.sh
rootfs/root/docker/setup/03-files.sh
rootfs/root/docker/setup/04-users.sh
rootfs/root/docker/setup/05-custom.sh
rootfs/root/docker/setup/06-post.sh
rootfs/root/docker/setup/07-cleanup.sh
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/bin/pkmgr
rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
2026-05-24 21:42:54 -04:00
parent 88d6d1191e
commit 32faf5eb1b
25 changed files with 856 additions and 817 deletions
+14 -12
View File
@@ -1,10 +1,10 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291148-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:48:49 AM EST 2025 # @@Created : Sun May 24 09:12:21 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
@@ -25,11 +25,12 @@ DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile" ENV_DOCKERFILE="Dockerfile"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
@@ -37,23 +38,23 @@ ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# Repository URLs (Full URLs) # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code # ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdevdocker/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdevdocker/ubuntu"
# ENV_REGISTRY_URL: Complete registry URL for reference (NOT used for pushing) # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
ENV_REGISTRY_URL="https://hub.docker.com/casjaysdevdocker/ubuntu" ENV_REGISTRY_URL="https://docker.io"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Push Configuration # Push Configuration
# ENV_IMAGE_PUSH: Complete push destination (this IS used for pushing) # ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_IMAGE_PUSH="casjaysdev/ubuntu" ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image # ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="latest" ENV_IMAGE_TAG="latest"
# ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag) # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
ENV_ADD_TAGS="USE_DATE" ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed) # Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull Configuration # Pull Configuration
# ENV_PULL_URL: Source image to pull from (base image) # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="ubuntu" ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image # ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -76,7 +77,8 @@ DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+50 -26
View File
@@ -1,60 +1,84 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202509161230-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Tue Sep 16 12:30:30 PM EDT 2025 # @@Created : Sun May 24 09:12:27 PM EDT 2026
# @@File : .env.scripts.18.04 # @@File : .env.scripts.18.04
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@Changelog : newScript
# @@TODO : Refactor code
# @@Other : N/A
# @@Resource : N/A
# @@Terminal App : yes
# @@sudo/root : yes
# @@Template : templates/dockerfiles/dotenv.template
# - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# entrypoint Settings # entrypoint Settings
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile.18.04" ENV_DOCKERFILE="Dockerfile.18.04"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# REPO info # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu"
ENV_REGISTRY_URL="docker.io" # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_REGISTRY_URL="https://docker.io"
# Push image info # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_IMAGE_PUSH="casjaysdev/ubuntu" # Push Configuration
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="18.04" ENV_IMAGE_TAG="18.04"
ENV_ADD_TAGS="bionic" # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull image info # Pull Configuration
ENV_PULL_URL="ubuntu" # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Env # Env
SERVICE_PORT="" SERVICE_PORT=""
EXPOSE_PORTS="" EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions # Versions
PHP_VERSION="system" PHP_VERSION="system"
NODE_VERSION="system" NODE_VERSION="system"
NODE_MANAGER="system" 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_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -
+50 -26
View File
@@ -1,60 +1,84 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202509161230-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Tue Sep 16 12:30:32 PM EDT 2025 # @@Created : Sun May 24 09:12:37 PM EDT 2026
# @@File : .env.scripts.20.04 # @@File : .env.scripts.20.04
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@Changelog : newScript
# @@TODO : Refactor code
# @@Other : N/A
# @@Resource : N/A
# @@Terminal App : yes
# @@sudo/root : yes
# @@Template : templates/dockerfiles/dotenv.template
# - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# entrypoint Settings # entrypoint Settings
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile.20.04" ENV_DOCKERFILE="Dockerfile.20.04"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# REPO info # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu"
ENV_REGISTRY_URL="docker.io" # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_REGISTRY_URL="https://docker.io"
# Push image info # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_IMAGE_PUSH="casjaysdev/ubuntu" # Push Configuration
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="20.04" ENV_IMAGE_TAG="20.04"
ENV_ADD_TAGS="focal" # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull image info # Pull Configuration
ENV_PULL_URL="ubuntu" # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Env # Env
SERVICE_PORT="" SERVICE_PORT=""
EXPOSE_PORTS="" EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions # Versions
PHP_VERSION="system" PHP_VERSION="system"
NODE_VERSION="system" NODE_VERSION="system"
NODE_MANAGER="system" 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_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -
+50 -26
View File
@@ -1,60 +1,84 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202509161230-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Tue Sep 16 12:30:33 PM EDT 2025 # @@Created : Sun May 24 09:12:42 PM EDT 2026
# @@File : .env.scripts.22.04 # @@File : .env.scripts.22.04
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@Changelog : newScript
# @@TODO : Refactor code
# @@Other : N/A
# @@Resource : N/A
# @@Terminal App : yes
# @@sudo/root : yes
# @@Template : templates/dockerfiles/dotenv.template
# - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# entrypoint Settings # entrypoint Settings
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile.22.04" ENV_DOCKERFILE="Dockerfile.22.04"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# REPO info # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu"
ENV_REGISTRY_URL="docker.io" # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_REGISTRY_URL="https://docker.io"
# Push image info # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_IMAGE_PUSH="casjaysdev/ubuntu" # Push Configuration
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="22.04" ENV_IMAGE_TAG="22.04"
ENV_ADD_TAGS="jammy" # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull image info # Pull Configuration
ENV_PULL_URL="ubuntu" # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Env # Env
SERVICE_PORT="" SERVICE_PORT=""
EXPOSE_PORTS="" EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions # Versions
PHP_VERSION="system" PHP_VERSION="system"
NODE_VERSION="system" NODE_VERSION="system"
NODE_MANAGER="system" 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_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -
+50 -26
View File
@@ -1,60 +1,84 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202509161230-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Tue Sep 16 12:30:34 PM EDT 2025 # @@Created : Sun May 24 09:12:46 PM EDT 2026
# @@File : .env.scripts.24.04 # @@File : .env.scripts.24.04
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@Changelog : newScript
# @@TODO : Refactor code
# @@Other : N/A
# @@Resource : N/A
# @@Terminal App : yes
# @@sudo/root : yes
# @@Template : templates/dockerfiles/dotenv.template
# - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# entrypoint Settings # entrypoint Settings
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile.24.04" ENV_DOCKERFILE="Dockerfile.24.04"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# REPO info # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu"
ENV_REGISTRY_URL="docker.io" # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_REGISTRY_URL="https://docker.io"
# Push image info # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_IMAGE_PUSH="casjaysdev/ubuntu" # Push Configuration
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="24.04" ENV_IMAGE_TAG="24.04"
ENV_ADD_TAGS="noble" # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull image info # Pull Configuration
ENV_PULL_URL="ubuntu" # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Env # Env
SERVICE_PORT="" SERVICE_PORT=""
EXPOSE_PORTS="" EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions # Versions
PHP_VERSION="system" PHP_VERSION="system"
NODE_VERSION="system" NODE_VERSION="system"
NODE_MANAGER="system" 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_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -
+50 -26
View File
@@ -1,60 +1,84 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202509161230-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Tue Sep 16 12:30:35 PM EDT 2025 # @@Created : Sun May 24 09:12:49 PM EDT 2026
# @@File : .env.scripts.24.10 # @@File : .env.scripts.24.10
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@Changelog : newScript
# @@TODO : Refactor code
# @@Other : N/A
# @@Resource : N/A
# @@Terminal App : yes
# @@sudo/root : yes
# @@Template : templates/dockerfiles/dotenv.template
# - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# entrypoint Settings # entrypoint Settings
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile.24.10" ENV_DOCKERFILE="Dockerfile.24.10"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# REPO info # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu"
ENV_REGISTRY_URL="docker.io" # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_REGISTRY_URL="https://docker.io"
# Push image info # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_IMAGE_PUSH="casjaysdev/ubuntu" # Push Configuration
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="24.10" ENV_IMAGE_TAG="24.10"
ENV_ADD_TAGS="oracular" # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull image info # Pull Configuration
ENV_PULL_URL="ubuntu" # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Env # Env
SERVICE_PORT="" SERVICE_PORT=""
EXPOSE_PORTS="" EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions # Versions
PHP_VERSION="system" PHP_VERSION="system"
NODE_VERSION="system" NODE_VERSION="system"
NODE_MANAGER="system" 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_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -
+50 -26
View File
@@ -1,60 +1,84 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202509161230-git ##@Version : 202605242112-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Tue Sep 16 12:30:34 PM EDT 2025 # @@Created : Sun May 24 09:12:53 PM EDT 2026
# @@File : .env.scripts.26.04 # @@File : .env.scripts.26.04
# @@Description : Variables for gen-dockerfile and buildx scripts # @@Description : Variables for gen-dockerfile and buildx scripts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@Changelog : newScript
# @@TODO : Refactor code
# @@Other : N/A
# @@Resource : N/A
# @@Terminal App : yes
# @@sudo/root : yes
# @@Template : templates/dockerfiles/dotenv.template
# - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# entrypoint Settings # entrypoint Settings
DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}" DOCKER_ENTYPOINT_PORTS_WEB="${DOCKER_ENTYPOINT_PORTS_WEB}"
DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}" DOCKER_ENTYPOINT_PORTS_SRV="${DOCKER_ENTYPOINT_PORTS_SRV}"
DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS" DOCKER_ENTYPOINT_HEALTH_APPS="$DOCKER_ENTYPOINT_HEALTH_APPS"
DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS" DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info # Dockerfile info
ENV_DOCKERFILE="Dockerfile.26.04" ENV_DOCKERFILE="Dockerfile.26.04"
ENV_IMAGE_NAME="ubuntu" # ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="ubuntu"
ENV_USE_TEMPLATE="ubuntu" ENV_USE_TEMPLATE="ubuntu"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info # Maintainer info
ENV_ORG_NAME="casjaysdev" ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev" ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev" ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>" ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# REPO info # Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu" ENV_GIT_REPO_URL="https://github.com/casjaysdev/ubuntu"
ENV_REGISTRY_URL="docker.io" # ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_REGISTRY_URL="https://docker.io"
# Push image info # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_IMAGE_PUSH="casjaysdev/ubuntu" # Push Configuration
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/ubuntu"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="26.04" ENV_IMAGE_TAG="26.04"
ENV_ADD_TAGS="resolute" # ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENV_ADD_TAGS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Additional push destinations (if needed)
ENV_ADD_IMAGE_PUSH="" ENV_ADD_IMAGE_PUSH=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Pull image info # Pull Configuration
ENV_PULL_URL="ubuntu" # ENV_PULL_URL: Source image to pull from (base image)
ENV_PULL_URL="casjaysdev/ubuntu"
# ENV_DISTRO_TAG: Tag for the pull source image
ENV_DISTRO_TAG="${IMAGE_VERSION}" ENV_DISTRO_TAG="${IMAGE_VERSION}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Env # Env
SERVICE_PORT="" SERVICE_PORT=""
EXPOSE_PORTS="" EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions # Versions
PHP_VERSION="system" PHP_VERSION="system"
NODE_VERSION="system" NODE_VERSION="system"
NODE_MANAGER="system" 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_FILE_DIR="/usr/local/share/template-files"
DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
DEFAULT_CONF_DIR="/usr/local/share/template-files/config" DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults" DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ENV_PACKAGES="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -
+1 -1
View File
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
+1 -1
View File
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates jq "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
+1 -1
View File
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates jq "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
+1 -1
View File
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates jq "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
+1 -1
View File
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates jq "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
+1 -1
View File
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates jq "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
+15 -23
View File
@@ -1,7 +1,7 @@
# Docker image for ubuntu using the ubuntu template # Docker image for ubuntu using the ubuntu template
ARG IMAGE_NAME="ubuntu" ARG IMAGE_NAME="ubuntu"
ARG PHP_SERVER="ubuntu" ARG PHP_SERVER="ubuntu"
ARG BUILD_DATE="202509161230" ARG BUILD_DATE="202605242104"
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"
@@ -24,9 +24,9 @@ ARG NODE_MANAGER="system"
ARG IMAGE_REPO="casjaysdev/ubuntu" ARG IMAGE_REPO="casjaysdev/ubuntu"
ARG IMAGE_VERSION="26.04" ARG IMAGE_VERSION="26.04"
ARG CONTAINER_VERSION="resolute" ARG CONTAINER_VERSION=""
ARG PULL_URL="ubuntu" ARG PULL_URL="casjaysdev/ubuntu"
ARG DISTRO_VERSION="${IMAGE_VERSION}" ARG DISTRO_VERSION="${IMAGE_VERSION}"
ARG BUILD_VERSION="${BUILD_DATE}" ARG BUILD_VERSION="${BUILD_DATE}"
@@ -57,7 +57,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS ARG SHELL_OPTS
ARG DEBIAN_FRONTEND ARG DEBIAN_FRONTEND
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip certbot ca-certificates jq " ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-pip ca-certificates "
ENV ENV=~/.profile ENV ENV=~/.profile
ENV SHELL="/bin/sh" ENV SHELL="/bin/sh"
@@ -73,7 +73,7 @@ ENV DEBIAN_FRONTEND="${DEBIAN_FRONTEND}"
USER ${USER} USER ${USER}
WORKDIR /root WORKDIR /root
COPY ./rootfs/usr/local/bin/. /usr/local/bin/ 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"; \
@@ -83,18 +83,10 @@ RUN set -e; \
echo "Setting up prerequisites"; \ echo "Setting up prerequisites"; \
echo "$LANG UTF-8" >"/etc/locale.gen"; \ echo "$LANG UTF-8" >"/etc/locale.gen"; \
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \ echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
arch="$(dpkg --print-architecture)"; \
case "$arch" in amd64|i386) ubuntu_mirror="http://archive.ubuntu.com/ubuntu"; ubuntu_security="http://security.ubuntu.com/ubuntu" ;; *) ubuntu_mirror="http://ports.ubuntu.com/ubuntu-ports"; ubuntu_security="$ubuntu_mirror" ;; esac; \
printf '%s\n' \
"deb ${ubuntu_mirror} resolute main restricted universe multiverse" \
"deb ${ubuntu_mirror} resolute-updates main restricted universe multiverse" \
"deb ${ubuntu_mirror} resolute-backports main restricted universe multiverse" \
"deb ${ubuntu_security} resolute-security main restricted universe multiverse" > /etc/apt/sources.list; \
rm -f /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
apt-get update && apt-get upgrade -yy && apt-get install -yy bash locales apt-utils; \ apt-get update && apt-get upgrade -yy && apt-get install -yy bash locales apt-utils; \
update-alternatives --install /bin/sh sh /bin/bash 1; \ update-alternatives --install /bin/sh sh /bin/bash 1; \
update-alternatives --install /usr/bin/sh sh /bin/bash 1; \ update-alternatives --install /usr/bin/sh sh /bin/bash 1; \
locale-gen $LANG && update-locale LANG=$LANG dpkg-reconfigure --frontend=noninteractive locales;update-locale LANG=$LANG
ENV SHELL="/bin/bash" ENV SHELL="/bin/bash"
SHELL [ "/bin/bash", "-c" ] SHELL [ "/bin/bash", "-c" ]
@@ -127,7 +119,6 @@ RUN echo "Initializing packages before copying files to image"; \
if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";/root/docker/setup/02-packages.sh||{ echo "Failed to execute /root/docker/setup/02-packages.sh" >&2 && exit 10; };echo "Done running the packages script";fi; \ if [ -f "/root/docker/setup/02-packages.sh" ];then echo "Running the packages script";/root/docker/setup/02-packages.sh||{ echo "Failed to execute /root/docker/setup/02-packages.sh" >&2 && exit 10; };echo "Done running the packages script";fi; \
echo "" echo ""
COPY ./rootfs/. /
COPY ./Dockerfile.26.04 /root/docker/Dockerfile COPY ./Dockerfile.26.04 /root/docker/Dockerfile
RUN echo "Updating system files "; \ RUN echo "Updating system files "; \
@@ -137,7 +128,7 @@ RUN echo "Updating system files "; \
echo 'hosts: files dns' >"/etc/nsswitch.conf"; \ echo 'hosts: files dns' >"/etc/nsswitch.conf"; \
[ "$PHP_VERSION" = "system" ] && PHP_VERSION="php" || true; \ [ "$PHP_VERSION" = "system" ] && PHP_VERSION="php" || true; \
PHP_BIN="$(command -v ${PHP_VERSION} 2>/dev/null || true)"; \ PHP_BIN="$(command -v ${PHP_VERSION} 2>/dev/null || true)"; \
PHP_FPM="$(ls /usr/*bin/php*fpm* 2>/dev/null || true)"; \ set -- /usr/*bin/php*fpm*; [ -e "$1" ] && PHP_FPM="$1" || PHP_FPM=""; \
pip_bin="$(command -v python3 2>/dev/null || command -v python2 2>/dev/null || command -v python 2>/dev/null || true)"; \ pip_bin="$(command -v python3 2>/dev/null || command -v python2 2>/dev/null || command -v python 2>/dev/null || true)"; \
py_version="$(command $pip_bin --version | sed 's|[pP]ython ||g' | awk -F '.' '{print $1$2}' | grep '[0-9]' || true)"; \ py_version="$(command $pip_bin --version | sed 's|[pP]ython ||g' | awk -F '.' '{print $1$2}' | grep '[0-9]' || true)"; \
[ "$py_version" -gt "310" ] && pip_opts="--break-system-packages " || pip_opts=""; \ [ "$py_version" -gt "310" ] && pip_opts="--break-system-packages " || pip_opts=""; \
@@ -194,7 +185,7 @@ RUN echo "Deleting unneeded files"; \
rm -rf /lib/systemd/system/sockets.target.wants/*udev* || true; \ rm -rf /lib/systemd/system/sockets.target.wants/*udev* || true; \
rm -rf /lib/systemd/system/sockets.target.wants/*initctl* || true; \ rm -rf /lib/systemd/system/sockets.target.wants/*initctl* || true; \
rm -Rf /usr/share/doc/* /var/tmp/* /var/cache/*/* /root/.cache/* /usr/share/info/* /tmp/* || true; \ rm -Rf /usr/share/doc/* /var/tmp/* /var/cache/*/* /root/.cache/* /usr/share/info/* /tmp/* || true; \
if [ -d "/lib/systemd/system/sysinit.target.wants" ];then cd "/lib/systemd/system/sysinit.target.wants" && rm -f $(ls | grep -v systemd-tmpfiles-setup);fi; \ if [ -d "/lib/systemd/system/sysinit.target.wants" ];then cd "/lib/systemd/system/sysinit.target.wants" && for want_file in *; do [ "$want_file" = "systemd-tmpfiles-setup" ] || rm -f "$want_file"; done; fi; \
if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute /root/docker/setup/07-cleanup.sh" >&2 && exit 10; };echo "Done running the cleanup script";fi; \ if [ -f "/root/docker/setup/07-cleanup.sh" ];then echo "Running the cleanup script";/root/docker/setup/07-cleanup.sh||{ echo "Failed to execute /root/docker/setup/07-cleanup.sh" >&2 && exit 10; };echo "Done running the cleanup script";fi; \
echo "" echo ""
@@ -211,6 +202,7 @@ ARG SERVICE_PORT
ARG EXPOSE_PORTS ARG EXPOSE_PORTS
ARG BUILD_VERSION ARG BUILD_VERSION
ARG IMAGE_VERSION ARG IMAGE_VERSION
ARG GIT_COMMIT
ARG WWW_ROOT_DIR ARG WWW_ROOT_DIR
ARG DEFAULT_FILE_DIR ARG DEFAULT_FILE_DIR
ARG DEFAULT_DATA_DIR ARG DEFAULT_DATA_DIR
@@ -237,12 +229,12 @@ LABEL org.opencontainers.image.authors="${LICENSE}"
LABEL org.opencontainers.image.created="${BUILD_DATE}" LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.version="${BUILD_VERSION}" LABEL org.opencontainers.image.version="${BUILD_VERSION}"
LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}" LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}"
LABEL org.opencontainers.image.url="docker.io" LABEL org.opencontainers.image.url="https://docker.io/casjaysdev/ubuntu"
LABEL org.opencontainers.image.source="docker.io" LABEL org.opencontainers.image.source="https://docker.io/casjaysdev/ubuntu"
LABEL org.opencontainers.image.vcs-type="Git" LABEL org.opencontainers.image.vcs-type="Git"
LABEL org.opencontainers.image.revision="${BUILD_VERSION}" LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
LABEL org.opencontainers.image.source="https://github.com/dockersrc/ubuntu" LABEL org.opencontainers.image.source="https://github.com/casjaysdev/ubuntu"
LABEL org.opencontainers.image.documentation="https://github.com/dockersrc/ubuntu" LABEL org.opencontainers.image.documentation="https://github.com/casjaysdev/ubuntu"
LABEL com.github.containers.toolbox="false" LABEL com.github.containers.toolbox="false"
ENV ENV=~/.bashrc ENV ENV=~/.bashrc
@@ -272,6 +264,6 @@ EXPOSE ${SERVICE_PORT} ${ENV_PORTS}
STOPSIGNAL SIGRTMIN+3 STOPSIGNAL SIGRTMIN+3
CMD [ "tail", "-f", "/dev/null" ]
ENTRYPOINT [ "tini", "-p", "SIGTERM","--", "/usr/local/bin/entrypoint.sh" ] ENTRYPOINT [ "tini", "-p", "SIGTERM","--", "/usr/local/bin/entrypoint.sh" ]
HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ] HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]
+5 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:50 PM EDT 2026
# @@File : 00-init.sh # @@File : 00-init.sh
# @@Description : script to run init # @@Description : script to run init
# @@Changelog : newScript # @@Changelog : newScript
@@ -36,9 +36,10 @@ if [ -d "/usr/local/share/template-files/defaults" ]; then rm -Rf "/usr/local/sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+5 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:50 PM EDT 2026
# @@File : 01-system.sh # @@File : 01-system.sh
# @@Description : script to run system # @@Description : script to run system
# @@Changelog : newScript # @@Changelog : newScript
@@ -34,9 +34,10 @@ exitCode=0
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+12 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242139-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:51 PM EDT 2026
# @@File : 02-packages.sh # @@File : 02-packages.sh
# @@Description : script to run packages # @@Description : script to run packages
# @@Changelog : newScript # @@Changelog : newScript
@@ -31,12 +31,20 @@ exitCode=0
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Main script # Main script
if command -v update-ca-certificates >/dev/null 2>&1; then
update-ca-certificates
elif command -v update-ca-trust >/dev/null 2>&1; then
update-ca-trust extract
elif command -v trust >/dev/null 2>&1; then
trust extract-compat
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+22 -17
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:51 PM EDT 2026
# @@File : 03-files.sh # @@File : 03-files.sh
# @@Description : script to run files # @@Description : script to run files
# @@Changelog : newScript # @@Changelog : newScript
@@ -31,51 +31,55 @@ exitCode=0
if [ -d "/tmp/bin" ]; then if [ -d "/tmp/bin" ]; then
mkdir -p "/usr/local/bin" mkdir -p "/usr/local/bin"
for bin in "/tmp/bin"/*; do for bin in "/tmp/bin"/*; do
name="$(basename -- "$bin")" [ -e "$bin" ] || continue
name="${bin##*/}"
echo "Installing $name to /usr/local/bin/$name" echo "Installing $name to /usr/local/bin/$name"
copy "$bin" "/usr/local/bin/$name" cp -Rf "$bin" "/usr/local/bin/$name"
chmod -f +x "/usr/local/bin/$name" chmod -f +x "/usr/local/bin/$name"
done done
fi fi
unset bin unset bin
if [ -d "/tmp/var" ]; then if [ -d "/tmp/var" ]; then
for var in "/tmp/var"/*; do for var in "/tmp/var"/*; do
name="$(basename -- "$var")" [ -e "$var" ] || continue
name="${var##*/}"
echo "Installing $var to /var/$name" echo "Installing $var to /var/$name"
if [ -d "$var" ]; then if [ -d "$var" ]; then
mkdir -p "/var/$name" mkdir -p "/var/$name"
copy "$var/." "/var/$name/" cp -Rf "$var/." "/var/$name/"
else else
copy "$var" "/var/$name" cp -Rf "$var" "/var/$name"
fi fi
done done
fi fi
unset var unset var
if [ -d "/tmp/etc" ]; then if [ -d "/tmp/etc" ]; then
for config in "/tmp/etc"/*; do for config in "/tmp/etc"/*; do
name="$(basename -- "$config")" [ -e "$config" ] || continue
name="${config##*/}"
echo "Installing $config to /etc/$name" echo "Installing $config to /etc/$name"
if [ -d "$config" ]; then if [ -d "$config" ]; then
mkdir -p "/etc/$name" mkdir -p "/etc/$name"
copy "$config/." "/etc/$name/" cp -Rf "$config/." "/etc/$name/"
mkdir -p "/usr/local/share/template-files/config/$name" mkdir -p "/usr/local/share/template-files/config/$name"
copy "$config/." "/usr/local/share/template-files/config/$name/" cp -Rf "$config/." "/usr/local/share/template-files/config/$name/"
else else
copy "$config" "/etc/$name" cp -Rf "$config" "/etc/$name"
copy "$config" "/usr/local/share/template-files/config/$name" cp -Rf "$config" "/usr/local/share/template-files/config/$name"
fi fi
done done
fi fi
unset config unset config
if [ -d "/tmp/data" ]; then if [ -d "/tmp/data" ]; then
for data in "/tmp/data"/*; do for data in "/tmp/data"/*; do
name="$(basename -- "$data")" [ -e "$data" ] || continue
name="${data##*/}"
echo "Installing $data to /usr/local/share/template-files/data" echo "Installing $data to /usr/local/share/template-files/data"
if [ -d "$data" ]; then if [ -d "$data" ]; then
mkdir -p "/usr/local/share/template-files/data/$name" mkdir -p "/usr/local/share/template-files/data/$name"
copy "$data/." "/usr/local/share/template-files/data/$name/" cp -Rf "$data/." "/usr/local/share/template-files/data/$name/"
else else
copy "$data" "/usr/local/share/template-files/data/$name" cp -Rf "$data" "/usr/local/share/template-files/data/$name"
fi fi
done done
fi fi
@@ -85,9 +89,10 @@ unset data
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+5 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:51 PM EDT 2026
# @@File : 04-users.sh # @@File : 04-users.sh
# @@Description : script to run users # @@Description : script to run users
# @@Changelog : newScript # @@Changelog : newScript
@@ -34,9 +34,10 @@ exitCode=0
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+5 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:51 PM EDT 2026
# @@File : 05-custom.sh # @@File : 05-custom.sh
# @@Description : script to run custom # @@Description : script to run custom
# @@Changelog : newScript # @@Changelog : newScript
@@ -34,9 +34,10 @@ exitCode=0
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+5 -4
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:51 PM EDT 2026
# @@File : 06-post.sh # @@File : 06-post.sh
# @@Description : script to run post # @@Description : script to run post
# @@Changelog : newScript # @@Changelog : newScript
@@ -34,9 +34,10 @@ exitCode=0
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+6 -5
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511291153-git ##@Version : 202605242057-git
# @@Author : CasjaysDev # @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro> # @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT # @@License : MIT
# @@Copyright : Copyright 2025 CasjaysDev # @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Sat Nov 29 11:53:14 AM EST 2025 # @@Created : Sun May 24 08:57:51 PM EDT 2026
# @@File : 07-cleanup.sh # @@File : 07-cleanup.sh
# @@Description : script to run cleanup # @@Description : script to run cleanup
# @@Changelog : newScript # @@Changelog : newScript
@@ -24,7 +24,7 @@ set -o pipefail
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS [ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Load functions # Load functions
__find_and_remove() { [ -z "$1" ] || find "${2:-/etc}" -iname "$1" -exec rm -Rf {} \; 2>/dev/null; } __find_and_remove() { [ -z "$1" ] || find "${2:-/etc}" -iname "$1" -exec rm -Rf {} + 2>/dev/null; }
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set env variables # Set env variables
exitCode=0 exitCode=0
@@ -38,9 +38,10 @@ if [ -d "$HOME/.cache" ]; then rm -Rf "$HOME/.cache"; fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Set the exit code # Set the exit code
#exitCode=$? exitCode=$?
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
exit $exitCode exit $exitCode
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh # ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
+88 -136
View File
@@ -1,55 +1,35 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511301726-git ##@Version : 202605241245-git
# @@Author : GEN_SCRIPT_REPLACE_AUTHOR # @@Author : Jason Hempstead
# @@Contact : GEN_SCRIPT_REPLACE_EMAIL # @@Contact : jason@casjaysdev.pro
# @@License : GEN_SCRIPT_REPLACE_LICENSE # @@License : WTFPL
# @@ReadME : entrypoint.sh --help # @@ReadME : entrypoint.sh --help
# @@Copyright : GEN_SCRIPT_REPLACE_COPYRIGHT # @@Copyright : Copyright: (c) 2026 Jason Hempstead, Casjays Developments
# @@Created : GEN_SCRIPT_REPLACE_DATE # @@Created : Sunday, May 24, 2026 20:57 EDT
# @@File : entrypoint.sh # @@File : entrypoint.sh
# @@Description : Entrypoint file for GEN_SCRIPT_REPLACE_APPNAME # @@Description : Entrypoint file for ubuntu
# @@Changelog : GEN_SCRIPT_REPLACE_CHANGELOG # @@Changelog : New script
# @@TODO : GEN_SCRIPT_REPLACE_TODO # @@TODO : Better documentation
# @@Other : GEN_SCRIPT_REPLACE_OTHER # @@Other :
# @@Resource : GEN_SCRIPT_REPLACE_RES # @@Resource :
# @@Terminal App : GEN_SCRIPT_REPLACE_TERMINAL # @@Terminal App : no
# @@sudo/root : GEN_SCRIPT_REPLACE_SUDO # @@sudo/root : no
# @@Template : other/docker-entrypoint # @@Template : other/docker-entrypoint
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329 # shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# run trap command on exit # run trap command on exit
trap '__trap_exit_handler' EXIT trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' INT TERM
trap '__trap_signal_handler' INT TERM PWR trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' SIGPWR 2>/dev/null || true
# - - - - - - - - - - - - - - - - - - - - - - - - -
__trap_exit_handler() {
local retVal=$?
if [ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ]; then
rm -Rf "$SERVICE_PID_FILE" 2>/dev/null || true
fi
exit $retVal
}
# - - - - - - - - - - - - - - - - - - - - - - - - -
__trap_signal_handler() {
local retVal=$?
echo "Container received shutdown signal"
if [ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ]; then
rm -Rf "$SERVICE_PID_FILE" 2>/dev/null || true
fi
exit $retVal
}
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html # setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
if [ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ]; then [ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}"
export DEBUGGER_OPTIONS="$(<"/config/.debug")"
else
DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}"
fi
if [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; then if [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; then
echo "Enabling debugging" echo "Enabling debugging"
set -o pipefail -x$DEBUGGER_OPTIONS set -o pipefail
[ -n "$DEBUGGER_OPTIONS" ] && set -"$DEBUGGER_OPTIONS"
export DEBUGGER="on" export DEBUGGER="on"
else else
set -o pipefail set -o pipefail
@@ -59,18 +39,12 @@ 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="GEN_SCRIPT_REPLACE_APPNAME" CONTAINER_NAME="ubuntu"
SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)" SCRIPT_NAME="${SCRIPT_FILE##*/}"
CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}" CONTAINER_NAME="${ENV_CONTAINER_NAME:-$CONTAINER_NAME}"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# remove whitespaces from beginning argument # remove whitespaces from beginning argument
while :; do while :; do [ "$1" = " " ] && shift 1 || break; done
if [ "$1" = " " ]; then
shift 1
else
break
fi
done
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
[ "$1" = "$SCRIPT_FILE" ] && shift 1 [ "$1" = "$SCRIPT_FILE" ] && shift 1
[ "$1" = "$SCRIPT_NAME" ] && shift 1 [ "$1" = "$SCRIPT_NAME" ] && shift 1
@@ -88,7 +62,7 @@ case "$1" in
-h | --help) -h | --help)
shift 1 shift 1
echo 'Docker container for '$CONTAINER_NAME'' echo 'Docker container for '$CONTAINER_NAME''
echo "Usage: $CONTAINER_NAME [help tail cron exec start init shell certbot ssl procs ports healthcheck backup command]" echo "Usage: $CONTAINER_NAME [help tail cron exec start init shell procs ports healthcheck backup command]"
echo "" echo ""
exit 0 exit 0
;; ;;
@@ -121,8 +95,8 @@ SERVICE_UID="${SERVICE_UID:-0}"
SERVICE_GID="${SERVICE_GID:-0}" SERVICE_GID="${SERVICE_GID:-0}"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# User and group in which the service switches to - IE: nginx,apache,mysql,postgres # User and group in which the service switches to - IE: nginx,apache,mysql,postgres
#SERVICE_USER="${SERVICE_USER:-GEN_SCRIPT_REPLACE_APPNAME}" # execute command as another user #SERVICE_USER="${SERVICE_USER:-ubuntu}" # execute command as another user
#SERVICE_GROUP="${SERVICE_GROUP:-GEN_SCRIPT_REPLACE_APPNAME}" # Set the service group #SERVICE_GROUP="${SERVICE_GROUP:-ubuntu}" # Set the service group
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Secondary ports # Secondary ports
# specifiy other ports # specifiy other ports
@@ -177,7 +151,7 @@ export DOMAINNAME="$(hostname -d)"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Default directories # Default directories
export SSL_DIR="${SSL_DIR:-/config/ssl}" export SSL_DIR="${SSL_DIR:-/config/ssl}"
export SSL_CA="${SSL_CERT:-/config/ssl/ca.crt}" export SSL_CA="${SSL_CA:-/config/ssl/ca.crt}"
export SSL_KEY="${SSL_KEY:-/config/ssl/localhost.pem}" export SSL_KEY="${SSL_KEY:-/config/ssl/localhost.pem}"
export SSL_CERT="${SSL_CERT:-/config/ssl/localhost.crt}" export SSL_CERT="${SSL_CERT:-/config/ssl/localhost.crt}"
export LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" export LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}"
@@ -198,13 +172,13 @@ export NGINX_CONFIG_FILE="${NGINX_CONFIG_FILE:-$(__find_nginx_conf)}"
export MYSQL_CONFIG_FILE="${MYSQL_CONFIG_FILE:-$(__find_mysql_conf)}" export MYSQL_CONFIG_FILE="${MYSQL_CONFIG_FILE:-$(__find_mysql_conf)}"
export PGSQL_CONFIG_FILE="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}" export PGSQL_CONFIG_FILE="${PGSQL_CONFIG_FILE:-$(__find_pgsql_conf)}"
export MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" export MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}"
export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-$ENTRYPOINT_PID_FILE}" export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/.entrypoint.pid}"
export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}"
export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}"
export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -n "$CONTAINER_WEB_SERVER_WWW_REPO" ]; then if [ -n "$CONTAINER_WEB_SERVER_WWW_REPO" ]; then
www_temp_dir="/tmp/git/$(basename -- "$CONTAINER_WEB_SERVER_WWW_REPO")" www_temp_dir="/tmp/git/${CONTAINER_WEB_SERVER_WWW_REPO##*/}"
rm -Rf "${WWW_ROOT_DIR:?}"/* "${www_temp_dir:?}"/* 2>/dev/null || true rm -Rf "${WWW_ROOT_DIR:?}"/* "${www_temp_dir:?}"/* 2>/dev/null || true
mkdir -p "$WWW_ROOT_DIR" "$www_temp_dir" 2>/dev/null || true mkdir -p "$WWW_ROOT_DIR" "$www_temp_dir" 2>/dev/null || true
git clone -q "$CONTAINER_WEB_SERVER_WWW_REPO" "$www_temp_dir" 2>/dev/null || true git clone -q "$CONTAINER_WEB_SERVER_WWW_REPO" "$www_temp_dir" 2>/dev/null || true
@@ -248,8 +222,6 @@ SERVER_PORTS="${SERVER_PORTS//,/ }" #
SERVER_PORTS="${SERVER_PORTS//\/*/}" # SERVER_PORTS="${SERVER_PORTS//\/*/}" #
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# clean WEB_SERVER_PORTS variables # clean WEB_SERVER_PORTS variables
WEB_SERVER_PORTS="${WEB_SERVER_PORT//\/*/}" #
WEB_SERVER_PORTS="${WEB_SERVER_PORTS//\/*/}" #
WEB_SERVER_PORTS="${WEB_SERVER_PORT//,/ } ${ENV_WEB_SERVER_PORTS//,/ }" # WEB_SERVER_PORTS="${WEB_SERVER_PORT//,/ } ${ENV_WEB_SERVER_PORTS//,/ }" #
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# rewrite and merge variables # rewrite and merge variables
@@ -322,7 +294,7 @@ fi
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
if [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then if [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then
if [ "$ENTRYPOINT_MESSAGE" = "yes" ]; then if [ "$ENTRYPOINT_MESSAGE" = "yes" ]; then
echo "Executing entrypoint script for GEN_SCRIPT_REPLACE_APPNAME" echo "Executing entrypoint script for ubuntu"
fi fi
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -391,7 +363,7 @@ if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -f "/etc/hostname" ]; then if [ -f "/etc/hostname" ]; then
if [ -n "$(type -P hostname 2>/dev/null)" ]; then if command -v hostname &>/dev/null; then
hostname -F "/etc/hostname" 2>/dev/null || true hostname -F "/etc/hostname" 2>/dev/null || true
else else
HOSTNAME="$(<"/etc/hostname")" 2>/dev/null || true HOSTNAME="$(<"/etc/hostname")" 2>/dev/null || true
@@ -401,12 +373,12 @@ if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# import hosts file into container # import hosts file into container
if [ -f "/usr/local/etc/hosts" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ]; then if [ -f "/usr/local/etc/hosts" ] && [ "$UPDATE_FILE_HOSTS" = "yes" ]; then
cat "/usr/local/etc/hosts" 2>/dev/null | grep -vF "$HOSTNAME" >>"/etc/hosts" 2>/dev/null || true grep -vF "$HOSTNAME" "/usr/local/etc/hosts" 2>/dev/null >>"/etc/hosts" 2>/dev/null || true
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# import resolv.conf file into container # import resolv.conf file into container
if [ "$CUSTOM_DNS" != "yes" ] && [ -f "/usr/local/etc/resolv.conf" ] && [ "$UPDATE_FILE_RESOLV" = "yes" ]; then if [ "$CUSTOM_DNS" != "yes" ] && [ -f "/usr/local/etc/resolv.conf" ] && [ "$UPDATE_FILE_RESOLV" = "yes" ]; then
cat "/usr/local/etc/resolv.conf" >"/etc/resolv.conf" 2>/dev/null || true cp -f "/usr/local/etc/resolv.conf" "/etc/resolv.conf" 2>/dev/null || true
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -n "$HOME" ] && [ -d "/usr/local/etc/skel" ]; then if [ -n "$HOME" ] && [ -d "/usr/local/etc/skel" ]; then
@@ -417,83 +389,89 @@ if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Delete any .gitkeep files # Delete any .gitkeep files (bash * does not match dotfiles by default,
# so the explicit /.gitkeep path is required at each depth)
if [ -d "/data" ]; then if [ -d "/data" ]; then
rm -Rf "/data/.gitkeep" "/data"/*/*.gitkeep 2>/dev/null || true rm -Rf "/data/.gitkeep" "/data"/*/.gitkeep 2>/dev/null || true
fi fi
if [ -d "/config" ]; then if [ -d "/config" ]; then
rm -Rf "/config/.gitkeep" "/config"/*/*.gitkeep 2>/dev/null || true rm -Rf "/config/.gitkeep" "/config"/*/.gitkeep 2>/dev/null || true
fi fi
if [ -f "/usr/local/bin/.gitkeep" ]; then if [ -f "/usr/local/bin/.gitkeep" ]; then
rm -Rf "/usr/local/bin/.gitkeep" 2>/dev/null || true rm -Rf "/usr/local/bin/.gitkeep" 2>/dev/null || true
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Only run initialization on first run or when directories are not initialized
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ] || [ "$CONFIG_DIR_INITIALIZED" = "no" ] || [ "$DATA_DIR_INITIALIZED" = "no" ]; then
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Setup bin directory - /config/bin > /usr/local/bin # Setup bin directory - /config/bin > /usr/local/bin
__initialize_custom_bin_dir __initialize_custom_bin_dir
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Copy default system configs - /usr/local/share/template-files/defaults > /config/ # Copy default system configs - /usr/local/share/template-files/defaults > /config/
if [ "$CONFIG_DIR_INITIALIZED" = "no" ]; then
__initialize_default_templates __initialize_default_templates
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Copy custom config files - /usr/local/share/template-files/config > /config/ # Copy custom config files - /usr/local/share/template-files/config > /config/
if [ "$CONFIG_DIR_INITIALIZED" = "no" ]; then
__initialize_config_dir __initialize_config_dir
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Copy custom data files - /usr/local/share/template-files/data > /data/ # Copy custom data files - /usr/local/share/template-files/data > /data/
if [ "$DATA_DIR_INITIALIZED" = "no" ]; then
__initialize_data_dir __initialize_data_dir
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Initialize SSL certificates
__initialize_ssl_certs __initialize_ssl_certs
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -f "$ENTRYPOINT_INIT_FILE" ]; then # Mark directories as initialized (only write if not already initialized)
ENTRYPOINT_FIRST_RUN="no" if [ -d "/config" ] && [ "$CONFIG_DIR_INITIALIZED" = "no" ]; then
fi echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE" 2>/dev/null || true
# - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -d "/config" ]; then
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_INIT_FILE" 2>/dev/null || true
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Check if this is a new container
if [ -f "$ENTRYPOINT_DATA_INIT_FILE" ]; then
DATA_DIR_INITIALIZED="yes"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -d "/data" ]; then
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_DATA_INIT_FILE" 2>/dev/null || true
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -f "$ENTRYPOINT_CONFIG_INIT_FILE" ]; then
CONFIG_DIR_INITIALIZED="yes" CONFIG_DIR_INITIALIZED="yes"
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -d "/config" ]; then if [ -d "/data" ] && [ "$DATA_DIR_INITIALIZED" = "no" ]; then
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_CONFIG_INIT_FILE" 2>/dev/null || true echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_DATA_INIT_FILE" 2>/dev/null || true
DATA_DIR_INITIALIZED="yes"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -d "/config" ] && [ ! -f "$ENTRYPOINT_INIT_FILE" ]; then
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_INIT_FILE" 2>/dev/null || true
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$ENTRYPOINT_FIRST_RUN" != "no" ]; then
# setup the smtp server # setup the smtp server
__setup_mta __setup_mta
# - - - - - - - - - - - - - - - - - - - - - - - - -
ENTRYPOINT_FIRST_RUN="no"
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# if no pid assume container restart - clean stale files on restart # if no pid assume container restart - clean stale files on restart
if [ -f "$ENTRYPOINT_PID_FILE" ]; then if [ -f "$ENTRYPOINT_PID_FILE" ]; then
# Check if the PID in the file is still running
entrypoint_pid=$(<"$ENTRYPOINT_PID_FILE") 2>/dev/null
if [ -n "$entrypoint_pid" ] && kill -0 "$entrypoint_pid" 2>/dev/null; then
# Process is still running, don't restart services
START_SERVICES="no" START_SERVICES="no"
touch "$ENTRYPOINT_PID_FILE" touch "$ENTRYPOINT_PID_FILE"
else
# PID file exists but process is dead - this is a restart
START_SERVICES="yes"
# Clean any stale PID files on restart
rm -f /run/.start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true
fi
else else
START_SERVICES=yes START_SERVICES=yes
# Clean any stale PID files on first run # Clean any stale PID files on first run
rm -f /run/.start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true rm -f /run/.start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$ENTRYPOINT_MESSAGE" = "yes" ]; then [ "$ENTRYPOINT_MESSAGE" = "yes" ] && __printf_space "40" "The containers ip address is:" "$CONTAINER_IP4_ADDRESS"
__printf_space "40" "The containers ip address is:" "$CONTAINER_IP4_ADDRESS"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Show configured listing processes # Show configured listing processes
if [ "$ENTRYPOINT_MESSAGE" = "yes" ] && [ -n "$ENV_PORTS" ]; then if [ "$ENTRYPOINT_MESSAGE" = "yes" ] && [ -n "$ENV_PORTS" ]; then
show_port="" show_port=""
for port in $ENV_PORTS; do for port in $ENV_PORTS; do [ -n "$port" ] && show_port+="$(printf '%s ' "${port// /}") "; done
if [ -n "$port" ]; then
show_port+="$(printf '%s ' "${port// /}") "
fi
done
__printf_space "40" "The following ports are open:" "$show_port" __printf_space "40" "The following ports are open:" "$show_port"
unset port show_port unset port show_port
fi fi
@@ -511,7 +489,7 @@ __set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-}
__run_message __run_message
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Just start services # Just start services
START_SERVICES="${START_SERVICES:-SYSTEM_INIT}" START_SERVICES="${START_SERVICES:-yes}"
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# Determine if we should start services based on command # Determine if we should start services based on command
# Only skip service start for the 'init' command # Only skip service start for the 'init' command
@@ -528,6 +506,9 @@ if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]; then
echo "$$" >"$ENTRYPOINT_PID_FILE" echo "$$" >"$ENTRYPOINT_PID_FILE"
__start_init_scripts "/usr/local/etc/docker/init.d" __start_init_scripts "/usr/local/etc/docker/init.d"
CONTAINER_INIT="${CONTAINER_INIT:-no}" CONTAINER_INIT="${CONTAINER_INIT:-no}"
# Services started successfully - enter monitoring mode
__no_exit
exit $?
fi fi
START_SERVICES="no" START_SERVICES="no"
fi fi
@@ -537,7 +518,7 @@ export START_SERVICES CONTAINER_INIT ENTRYPOINT_PID_FILE
case "$1" in case "$1" in
init) init)
shift 1 shift 1
echo "Container has been Initialized" __log_info "Container has been initialized"
exit 0 exit 0
;; ;;
tail) tail)
@@ -566,10 +547,10 @@ logs)
tail -Fq /data/logs/*/* tail -Fq /data/logs/*/*
;; ;;
clean) clean)
log_files="$(find "/data/logs" -type f)" mapfile -t log_files < <(find "/data/logs" -type f 2>/dev/null)
for log in "${log_files[@]}"; do for log in "${log_files[@]}"; do
echo "clearing $log" __log_info "Clearing log file: $log"
printf '' >$log printf '' >"$log"
done done
;; ;;
*) *)
@@ -581,7 +562,7 @@ logs)
cron) cron)
shift 1 shift 1
__cron "$@" & __cron "$@" &
echo "cron script is running with pid: $!" __log_info "Cron script is running with PID: $!"
exit exit
;; ;;
# backup data and config dirs # backup data and config dirs
@@ -604,16 +585,16 @@ healthcheck)
healthPorts="${WEB_SERVER_PORTS:-}" healthPorts="${WEB_SERVER_PORTS:-}"
healthEndPoints="${HEALTH_ENDPOINTS:-}" healthEndPoints="${HEALTH_ENDPOINTS:-}"
SERVICES_LIST="${arguments:-$SERVICES_LIST}" SERVICES_LIST="${arguments:-$SERVICES_LIST}"
services="$(echo "${SERVICES_LIST//,/ }")" services="${SERVICES_LIST//,/ }"
healthMessage="Everything seems to be running" healthMessage="Everything seems to be running"
[ "$healthEnabled" = "yes" ] || exit 0 [ "$healthEnabled" = "yes" ] || exit 0
if [ -d "/run/healthcheck" ] && [ "$(ls -A "/run/healthcheck" | wc -l)" -ne 0 ]; then if [ -d "/run/healthcheck" ] && ! __is_dir_empty "/run/healthcheck"; then
for service in /run/healthcheck/*; do for service in /run/healthcheck/*; do
name=$(basename -- $service) name="${service##*/}"
services+="$name " services+="$name "
done done
fi fi
services="$(echo "$services" | tr ' ' '\n' | sort -u | grep -v '^$')" services="$(printf '%s\n' $services | sort -u | grep -v '^$')"
for proc in $services; do for proc in $services; do
if [ -n "$proc" ]; then if [ -n "$proc" ]; then
if ! __pgrep "$proc"; then if ! __pgrep "$proc"; then
@@ -622,8 +603,8 @@ healthcheck)
fi fi
fi fi
done done
for port in $ports; do for port in $healthPorts; do
if [ -n "$(type -P netstat)" ] && [ -n "$port" ]; then if command -v netstat &>/dev/null && [ -n "$port" ]; then
if ! netstat -taupln | grep -q ":$port "; then if ! netstat -taupln | grep -q ":$port "; then
echo "$port isn't open" >&2 echo "$port isn't open" >&2
healthStatus=$((healthStatus + 1)) healthStatus=$((healthStatus + 1))
@@ -647,38 +628,17 @@ healthcheck)
# show open ports # show open ports
ports) ports)
shift 1 shift 1
ports="$(__netstat -taupln | awk -F ' ' '{print $4}' | awk -F ':' '{print $2}' | sort --unique --version-sort | grep -v '^$' | grep '^' || echo '')" ports="$(__netstat -taupln 2>/dev/null | awk '{ split($4, a, ":"); if (a[2] != "") print a[2] }' | sort -uV)"
[ -n "$ports" ] && printf '%s\n%s\n' "The following are servers:" "$ports" | tr '\n' ' ' [ -n "$ports" ] && printf '%s\n%s\n' "The following are servers:" "$ports" | tr '\n' ' '
exit $? exit $?
;; ;;
# show running processes # show running processes
procs) procs)
shift 1 shift 1
ps="$(__ps axco command | grep -vE 'COMMAND|grep|ps' | sort -u || grep '^' || echo '')" ps="$(__ps axco command 2>/dev/null | grep -vE '^(COMMAND|grep|ps)$' | sort -u)"
[ -n "$ps" ] && printf '%s\n%s\n' "Found the following processes" "$ps" | tr '\n' ' ' [ -n "$ps" ] && printf '%s\n%s\n' "Found the following processes" "$ps" | tr '\n' ' '
exit $? exit $?
;; ;;
# setup ssl
ssl)
shift 1
__create_ssl_cert
exit $?
;;
# manage ssl certificate
certbot)
shift 1
CERT_BOT_ENABLED="yes"
if [ "$1" = "create" ]; then
shift 1
__certbot "create"
elif [ "$1" = "renew" ]; then
shift 1
__certbot "renew certonly --force-renew"
else
__exec_command "certbot" "$@"
fi
exit $?
;;
# Launch shell # Launch shell
*/bin/sh | */bin/bash | bash | sh | shell) */bin/sh | */bin/bash | bash | sh | shell)
shift 1 shift 1
@@ -697,11 +657,7 @@ start)
export PATH="/usr/local/etc/docker/init.d:$PATH" export PATH="/usr/local/etc/docker/init.d:$PATH"
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
scripts="$(ls -A "/usr/local/etc/docker/init.d")" scripts="$(ls -A "/usr/local/etc/docker/init.d")"
if [ -n "$scripts" ]; then [ -n "$scripts" ] && echo "$scripts" || echo "No scripts found in: /usr/local/etc/docker/init.d"
echo "$scripts"
else
echo "No scripts found in: /usr/local/etc/docker/init.d"
fi
exit exit
elif [ "$1" = "all" ]; then elif [ "$1" = "all" ]; then
shift $# shift $#
@@ -720,11 +676,7 @@ start)
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
if [ ! -f "$ENTRYPOINT_PID_FILE" ]; then if [ ! -f "$ENTRYPOINT_PID_FILE" ]; then
echo "$$" >"$ENTRYPOINT_PID_FILE" echo "$$" >"$ENTRYPOINT_PID_FILE"
if [ "$START_SERVICES" = "no" ] && [ "$CONTAINER_INIT" = "yes" ]; then [ "$START_SERVICES" = "no" ] && [ "$CONTAINER_INIT" = "yes" ] || __start_init_scripts "/usr/local/etc/docker/init.d"
:
else
__start_init_scripts "/usr/local/etc/docker/init.d"
fi
fi fi
__no_exit __no_exit
else else
+2 -1
View File
@@ -103,7 +103,7 @@ install)
[ -n "$1" ] || exit 0 [ -n "$1" ] || exit 0
[ "$USER_UID" -eq 0 ] || [ "$USER" = "root" ] || pkmgr_install_cmd="sudo $pkmgr_install_cmd" [ "$USER_UID" -eq 0 ] || [ "$USER" = "root" ] || pkmgr_install_cmd="sudo $pkmgr_install_cmd"
if [ -f "$1" ]; then if [ -f "$1" ]; then
install_list="$(cat "$1")" install_list="$(tr '\n' ' ' < "$1")"
else else
install_list="$*" install_list="$*"
fi fi
@@ -140,3 +140,4 @@ clean)
esac esac
# - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - -
# end # end
File diff suppressed because it is too large Load Diff