🗃️ Committing everything that changed 🗃️

Dockerfile
Dockerfile.7
Dockerfile.8
rootfs/root/docker/setup/02-packages.sh
rootfs/root/docker/setup/03-files.sh
rootfs/root/docker/setup/05-custom.sh
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
casjay 2024-10-11 13:42:52 -04:00
parent 838729d4c3
commit 83b78ec6ca
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145
8 changed files with 39 additions and 8 deletions

View File

@ -10,6 +10,7 @@ ARG DEFAULT_FILE_DIR="/usr/local/share/template-files"
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
ARG PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ARG USER="root"
ARG SHELL_OPTS="set -e -o pipefail"
@ -31,6 +32,7 @@ ARG BUILD_VERSION="${BUILD_DATE}"
FROM tianon/gosu:latest AS gosu
FROM ${PULL_URL}:${DISTRO_VERSION} AS build
ARG TZ
ARG PATH
ARG USER
ARG LICENSE
ARG TIMEZONE
@ -57,6 +59,7 @@ ARG PACK_LIST="bash-completion git curl wget sudo unzip iproute2 ssmtp openssl j
ENV ENV=~/.profile
ENV SHELL="/bin/sh"
ENV PATH="${PATH}"
ENV TZ="${TIMEZONE}"
ENV TIMEZONE="${TZ}"
ENV LANG="${LANGUAGE}"
@ -68,6 +71,10 @@ WORKDIR /root
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
RUN set -e; \
echo "Updating the system"; \
pkmgr update
RUN set -e; \
echo "Setting up prerequisites"; \
apk add --no-cache bash
@ -178,6 +185,7 @@ RUN echo "Deleting unneeded files"; \
RUN echo "Init done"
FROM scratch
ARG TZ
ARG PATH
ARG USER
ARG TIMEZONE
ARG LANGUAGE
@ -223,6 +231,7 @@ LABEL com.github.containers.toolbox="false"
ENV ENV=~/.bashrc
ENV USER="${USER}"
ENV PATH="${PATH}"
ENV SHELL="/bin/bash"
ENV TZ="${TIMEZONE}"
ENV TIMEZONE="${TZ}"

View File

@ -10,6 +10,7 @@ ARG DEFAULT_FILE_DIR="/usr/local/share/template-files"
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
ARG PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ARG USER="root"
ARG SHELL_OPTS="set -e -o pipefail"
@ -31,6 +32,7 @@ ARG BUILD_VERSION="${BUILD_DATE}"
FROM tianon/gosu:latest AS gosu
FROM ${PULL_URL}:${DISTRO_VERSION} AS build
ARG TZ
ARG PATH
ARG USER
ARG LICENSE
ARG TIMEZONE
@ -57,6 +59,7 @@ ARG PACK_LIST="bash-completion git curl wget sudo unzip iproute2 ssmtp openssl j
ENV ENV=~/.profile
ENV SHELL="/bin/sh"
ENV PATH="${PATH}"
ENV TZ="${TIMEZONE}"
ENV TIMEZONE="${TZ}"
ENV LANG="${LANGUAGE}"
@ -68,6 +71,10 @@ WORKDIR /root
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
RUN set -e; \
echo "Updating the system"; \
pkmgr update
RUN set -e; \
echo "Setting up prerequisites"; \
apk add --no-cache bash
@ -178,6 +185,7 @@ RUN echo "Deleting unneeded files"; \
RUN echo "Init done"
FROM scratch
ARG TZ
ARG PATH
ARG USER
ARG TIMEZONE
ARG LANGUAGE
@ -223,6 +231,7 @@ LABEL com.github.containers.toolbox="false"
ENV ENV=~/.bashrc
ENV USER="${USER}"
ENV PATH="${PATH}"
ENV SHELL="/bin/bash"
ENV TZ="${TIMEZONE}"
ENV TIMEZONE="${TZ}"

View File

@ -10,6 +10,7 @@ ARG DEFAULT_FILE_DIR="/usr/local/share/template-files"
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
ARG PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ARG USER="root"
ARG SHELL_OPTS="set -e -o pipefail"
@ -31,6 +32,7 @@ ARG BUILD_VERSION="${BUILD_DATE}"
FROM tianon/gosu:latest AS gosu
FROM ${PULL_URL}:${DISTRO_VERSION} AS build
ARG TZ
ARG PATH
ARG USER
ARG LICENSE
ARG TIMEZONE
@ -57,6 +59,7 @@ ARG PACK_LIST="bash-completion git curl wget sudo unzip iproute2 ssmtp openssl j
ENV ENV=~/.profile
ENV SHELL="/bin/sh"
ENV PATH="${PATH}"
ENV TZ="${TIMEZONE}"
ENV TIMEZONE="${TZ}"
ENV LANG="${LANGUAGE}"
@ -68,6 +71,10 @@ WORKDIR /root
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
RUN set -e; \
echo "Updating the system"; \
pkmgr update
RUN set -e; \
echo "Setting up prerequisites"; \
apk add --no-cache bash
@ -178,6 +185,7 @@ RUN echo "Deleting unneeded files"; \
RUN echo "Init done"
FROM scratch
ARG TZ
ARG PATH
ARG USER
ARG TIMEZONE
ARG LANGUAGE
@ -222,6 +230,7 @@ LABEL org.opencontainers.image.documentation="https://github.com/casjaysdevdocke
LABEL com.github.containers.toolbox="false"
ENV ENV=~/.bashrc
ENV PATH="${PATH}"
ENV USER="${USER}"
ENV SHELL="/bin/bash"
ENV TZ="${TIMEZONE}"

View File

@ -24,9 +24,10 @@ set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set env variables
exitCode=0
[ ! -f "/usr/local/etc/php-fpm.conf.default" ] || rm -Rf "/usr/local/etc/php-fpm.conf.default"
[ ! -f "/usr/local/etc/php-fpm.d/www.conf.default" ] || rm -Rf "/usr/local/etc/php-fpm.d/www.conf.default"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Predifined actions
# Predefined actions
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main script

View File

@ -56,7 +56,7 @@ if [ -d "/tmp/etc" ]; then
echo "Installing $config to /etc/$name"
if [ -d "$config" ]; then
mkdir -p "/etc/$name"
copy "$config/." "/etc/$name/"
copy "$config/." "/usr/local/etc/$name/"
mkdir -p "/usr/local/share/template-files/config/$name"
copy "$config/." "/usr/local/share/template-files/config/$name/"
else

View File

@ -38,7 +38,7 @@ if [ -n "$EXT_INSTALLED" ]; then
chmod +x "$BIN_DIR/install-php-extensions"
for ext in $EXT_LIST $EXT_ADDITIONAL; do
if ! echo "$ext" | grep -q "$EXT_INSTALLED"; then
install-php-extensions $ext
apk add --no-cache php-$ext || install-php-extensions $ext
fi
done
else

View File

@ -24,7 +24,7 @@
[ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ] && export DEBUGGER_OPTIONS="$(<"/config/.debug")" || DEBUGGER_OPTIONS="${DEBUGGER_OPTIONS:-}"
{ [ "$DEBUGGER" = "on" ] || [ -f "/config/.debug" ]; } && echo "Enabling debugging" && set -o pipefail -x$DEBUGGER_OPTIONS && export DEBUGGER="on" || set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
export PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
SCRIPT_FILE="$0"

View File

@ -1058,7 +1058,9 @@ __initialize_ssl_certs() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__start_php_dev_server() {
local web_root="${1:-$WWW_ROOT_DIR}"
if [ -n "$PHP_DEV_SERVER_PORT" ] && [ "$2" = "yes" ]; then
local start_server="${2:-$PHP_DEV_SERVER_START}"
[ "$CONTAINER_NAME" = "php" ] && start_server="yes"
if [ -n "$PHP_DEV_SERVER_PORT" ] && [ "$start_server" = "yes" ]; then
if ! echo "$web_root" | grep -q "^/usr/share/httpd"; then
find "$web_root" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null
php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "$web_root"
@ -1153,6 +1155,7 @@ export LANG="${LANG:-C.UTF-8}"
export LC_ALL="${LANG:-C.UTF-8}"
export TZ="${TZ:-${TIMEZONE:-America/New_York}}"
export HOSTNAME="${FULL_DOMAIN_NAME:-${SERVER_HOSTNAME:-$HOSTNAME}}"
export PATH="/usr/local/etc/docker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Default directories
export SSL_DIR="${SSL_DIR:-/config/ssl}"