🗃️ Removed the .claude/settings.local.json 🗃️
Some checks failed
blueonyx / release-blueonyx (push) Has been cancelled

Dockerfile
.env.scripts
.gitattributes
.gitea/workflows/docker.yaml
.gitignore
LICENSE.md
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/bin/pkmgr
This commit is contained in:
casjay
2026-05-12 20:05:36 -04:00
parent d84c7aed2f
commit 81319e30a8
8 changed files with 368 additions and 191 deletions

View File

@@ -28,7 +28,8 @@ ARG PULL_URL="almalinux/10-init"
ARG DISTRO_VERSION="latest"
ARG BUILD_VERSION="${BUILD_DATE}"
FROM almalinux/10-init
FROM tianon/gosu:latest AS gosu
FROM ${PULL_URL}:${DISTRO_VERSION}
ARG TZ
ARG PATH
ARG USER
@@ -41,6 +42,7 @@ ARG SERVICE_PORT
ARG EXPOSE_PORTS
ARG BUILD_VERSION
ARG IMAGE_VERSION
ARG GIT_COMMIT
ARG WWW_ROOT_DIR
ARG DEFAULT_FILE_DIR
ARG DEFAULT_DATA_DIR
@@ -52,6 +54,8 @@ ARG NODE_MANAGER
ARG PHP_VERSION
ARG PHP_SERVER
ARG SHELL_OPTS
ARG ENV_PORTS="${EXPOSE_PORTS}"
ARG LICENSE="WTFPL"
ARG PACK_LIST="bash bash-completion git curl wget sudo unzip iproute net-tools glibc-langpack-en pinentry python3-pip ca-certificates systemd systemd-libs NetworkManager valkey valkey-compat-redis certbot python3-certbot-apache python3-certbot-nginx cronie mod_authnz_external "
@@ -67,7 +71,7 @@ ENV HOSTNAME="casjaysdevdocker-blueonyx"
USER ${USER}
WORKDIR /root
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
COPY ./rootfs/. /
RUN set -e; \
echo "Updating the system and ensuring bash is installed"; \
@@ -75,11 +79,19 @@ RUN set -e; \
RUN set -e; \
echo "Setting up prerequisites"; \
true
yum makecache && yum install -yy bash; \
SH_CMD="$(which sh 2>/dev/null||command -v sh 2>/dev/null)"; \
BASH_CMD="$(which bash 2>/dev/null||command -v bash 2>/dev/null)"; \
[ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/bin/sh" || true; \
[ -x "$BASH_CMD" ] && symlink "$BASH_CMD" "/usr/bin/sh" || true; \
[ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && symlink "$BASH_CMD" "$SH_CMD" || true; \
[ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true
ENV SHELL="/bin/bash"
SHELL [ "/bin/bash", "-c" ]
COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
RUN echo "Initializing the system"; \
$SHELL_OPTS; \
mkdir -p "${DEFAULT_DATA_DIR}" "${DEFAULT_CONF_DIR}" "${DEFAULT_TEMPLATE_DIR}" "/root/docker/setup" "/etc/profile.d"; \
@@ -88,7 +100,8 @@ RUN echo "Initializing the system"; \
RUN echo "Creating and editing system files "; \
$SHELL_OPTS; \
[ -f "/root/.profile" ] || touch "/root/.profile"; \
touch "/etc/profile" "/root/.profile"; \
pkmgr update && pkmgr install epel-release; crb enable || true; \
if [ -f "/root/docker/setup/01-system.sh" ];then echo "Running the system script";/root/docker/setup/01-system.sh||{ echo "Failed to execute /root/docker/setup/01-system.sh" >&2 && exit 10; };echo "Done running the system script";fi; \
echo ""
@@ -106,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; \
echo ""
COPY ./rootfs/. /
COPY ./Dockerfile /root/docker/Dockerfile
RUN echo "Updating system files "; \
@@ -116,7 +128,7 @@ RUN echo "Updating system files "; \
echo 'hosts: files dns' >"/etc/nsswitch.conf"; \
[ "$PHP_VERSION" = "system" ] && PHP_VERSION="php" || 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)"; \
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=""; \
@@ -168,6 +180,7 @@ RUN echo "Deleting unneeded files"; \
rm -Rf /usr/share/doc/* /usr/share/info/* /tmp/* || true; \
rm -Rf /var/cache/*/* /root/.cache/* || true; \
find /var/tmp -mindepth 1 -delete 2>/dev/null || true; \
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; \
echo ""
@@ -176,6 +189,43 @@ RUN echo "Init done"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Final configuration (no separate stage for systemd containers)
LABEL maintainer="CasjaysDev <docker-admin@casjaysdev.pro>"
LABEL org.opencontainers.image.vendor="CasjaysDev"
LABEL org.opencontainers.image.authors="CasjaysDev"
LABEL org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}"
LABEL org.opencontainers.image.title="${IMAGE_NAME}"
LABEL org.opencontainers.image.base.name="${IMAGE_NAME}"
LABEL org.opencontainers.image.authors="${LICENSE}"
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.version="${BUILD_VERSION}"
LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}"
LABEL org.opencontainers.image.url="https://docker.io/casjaysdevdocker/blueonyx"
LABEL org.opencontainers.image.source="https://docker.io/casjaysdevdocker/blueonyx"
LABEL org.opencontainers.image.vcs-type="Git"
LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
LABEL org.opencontainers.image.source="https://github.com/casjaysdevdocker/blueonyx"
LABEL org.opencontainers.image.documentation="https://github.com/casjaysdevdocker/blueonyx"
LABEL com.github.containers.toolbox="false"
ENV ENV=~/.bashrc
ENV USER="${USER}"
ENV PATH="${PATH}"
ENV TZ="${TIMEZONE}"
ENV SHELL="/bin/bash"
ENV TIMEZONE="${TZ}"
ENV LANG="${LANGUAGE}"
ENV TERM="xterm-256color"
ENV PORT="${SERVICE_PORT}"
ENV ENV_PORTS="${ENV_PORTS}"
ENV CONTAINER_NAME="${IMAGE_NAME}"
ENV HOSTNAME="casjaysdev-${IMAGE_NAME}"
ENV PHP_SERVER="${PHP_SERVER}"
ENV NODE_VERSION="${NODE_VERSION}"
ENV NODE_MANAGER="${NODE_MANAGER}"
ENV PHP_VERSION="${PHP_VERSION}"
ENV DISTRO_VERSION="${IMAGE_VERSION}"
ENV WWW_ROOT_DIR="${WWW_ROOT_DIR}"
VOLUME [ "/config","/data" ]
EXPOSE ${SERVICE_PORT} ${ENV_PORTS}