mirror of
https://github.com/dockersrc/alpine
synced 2026-06-30 17:45:53 -04:00
2405b43f96
- Updated Dockerfile and version-specific Dockerfile variants (3.14–3.23, edge) - Updated .env.scripts and its version-specific variants (3.14–3.23, edge) - Synchronized changes across all supported Alpine release branches - Maintained consistency between base Dockerfile/env and per-version overrides Dockerfile Dockerfile.3.14 Dockerfile.3.15 Dockerfile.3.16 Dockerfile.3.17 Dockerfile.3.18 Dockerfile.3.19 Dockerfile.3.20 Dockerfile.3.21 Dockerfile.3.22 Dockerfile.3.23 Dockerfile.edge .env.scripts .env.scripts.3.14 .env.scripts.3.15 .env.scripts.3.16 .env.scripts.3.17 .env.scripts.3.18 .env.scripts.3.19 .env.scripts.3.20 .env.scripts.3.21 .env.scripts.3.22 .env.scripts.3.23 .env.scripts.edge
115 lines
3.4 KiB
Docker
115 lines
3.4 KiB
Docker
# syntax=docker/dockerfile:1
|
|
# Docker image for alpine using the alpine template
|
|
ARG IMAGE_NAME="alpine"
|
|
ARG PHP_SERVER="alpine"
|
|
ARG BUILD_DATE="202408111050"
|
|
ARG LANGUAGE="en_US.UTF-8"
|
|
ARG TIMEZONE="America/New_York"
|
|
ARG WWW_ROOT_DIR="/usr/local/share/httpd/default"
|
|
ARG DEFAULT_FILE_DIR="/usr/local/share/template-files"
|
|
ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data"
|
|
ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config"
|
|
ARG DEFAULT_TEMPLATE_DIR="/usr/local/share/template-files/defaults"
|
|
|
|
ARG USER="root"
|
|
ARG SHELL_OPTS="set -e -o pipefail"
|
|
|
|
ARG SERVICE_PORT=""
|
|
ARG EXPOSE_PORTS=""
|
|
ARG PHP_VERSION="system"
|
|
ARG NODE_VERSION="system"
|
|
ARG NODE_MANAGER="system"
|
|
|
|
ARG IMAGE_REPO="casjaysdev/alpine"
|
|
ARG IMAGE_VERSION="latest"
|
|
ARG CONTAINER_VERSION=""
|
|
|
|
ARG PULL_URL="alpine"
|
|
ARG DISTRO_VERSION="${IMAGE_VERSION}"
|
|
ARG BUILD_VERSION="${BUILD_DATE}"
|
|
|
|
FROM tianon/gosu:latest AS gosu
|
|
FROM ${PULL_URL}:${DISTRO_VERSION} AS build
|
|
ARG TZ
|
|
ARG USER
|
|
ARG LICENSE
|
|
ARG TIMEZONE
|
|
ARG LANGUAGE
|
|
ARG IMAGE_NAME
|
|
ARG BUILD_DATE
|
|
ARG SERVICE_PORT
|
|
ARG BUILD_VERSION
|
|
ARG SHELL_OPTS
|
|
ARG DISTRO_VERSION
|
|
ARG CONTAINER_VERSION
|
|
|
|
ARG PACK_LIST="bash tini bash-completion git curl wget sudo unzip iproute2 openrc ssmtp openssl jq tzdata mailcap ncurses util-linux pciutils usbutils coreutils binutils findutils grep rsync zip py3-pip procps net-tools sed gawk attr readline lsof less shadow certbot ca-certificates "
|
|
|
|
ENV ENV=~/.profile
|
|
ENV SHELL="/bin/sh"
|
|
ENV TZ="${TIMEZONE}"
|
|
ENV TIMEZONE="${TZ}"
|
|
ENV LANG="${LANGUAGE}"
|
|
ENV TERM="xterm-256color"
|
|
ENV PORT="${SERVICE_PORT}"
|
|
ENV CONTAINER_NAME="${IMAGE_NAME}"
|
|
ENV HOSTNAME="${CONTAINER_NAME}"
|
|
ENV USER="${USER}"
|
|
|
|
USER ${USER}
|
|
WORKDIR /root
|
|
|
|
COPY ./rootfs/. /
|
|
|
|
RUN set -e; \
|
|
echo 'Installing packages' && \
|
|
apk update && apk add --no-cache ${PACK_LIST}
|
|
|
|
RUN set -e; \
|
|
echo 'Running initial scripts' && \
|
|
sh -c "INIT_DATE='${BUILD_DATE}' && export INIT_DATE && bash -c /root/docker/setup/00-init.sh" && \
|
|
echo 'Initial setup completed'
|
|
|
|
RUN set -e; \
|
|
echo 'Running post install scripts' && \
|
|
if [ -f "/root/docker/setup/02-packages.sh" ]; then bash -c "/root/docker/setup/02-packages.sh"; fi && \
|
|
if [ -f "/root/docker/setup/03-files.sh" ]; then bash -c "/root/docker/setup/03-files.sh"; fi && \
|
|
if [ -f "/root/docker/setup/04-users.sh" ]; then bash -c "/root/docker/setup/04-users.sh"; fi && \
|
|
if [ -f "/root/docker/setup/05-custom.sh" ]; then bash -c "/root/docker/setup/05-custom.sh"; fi && \
|
|
echo 'Post install completed'
|
|
|
|
FROM scratch
|
|
ARG BUILD_DATE
|
|
ARG IMAGE_NAME
|
|
ARG TIMEZONE
|
|
ARG LANGUAGE
|
|
|
|
ENV ENV=~/.profile
|
|
ENV SHELL="/bin/sh"
|
|
ENV TZ="${TIMEZONE}"
|
|
ENV TIMEZONE="${TZ}"
|
|
ENV LANG="${LANGUAGE}"
|
|
ENV TERM="xterm-256color"
|
|
ENV CONTAINER_NAME="${IMAGE_NAME}"
|
|
ENV HOSTNAME="${CONTAINER_NAME}"
|
|
ENV USER="root"
|
|
|
|
USER root
|
|
WORKDIR /root
|
|
|
|
LABEL org.opencontainers.image.vendor="CasjaysDev"
|
|
LABEL org.opencontainers.image.title="${IMAGE_NAME}"
|
|
LABEL org.opencontainers.image.base.name="${IMAGE_NAME}"
|
|
LABEL org.opencontainers.image.description="Containerized version of ${IMAGE_NAME}"
|
|
LABEL org.opencontainers.image.build-date="${BUILD_DATE}"
|
|
LABEL org.opencontainers.image.authors="CasjaysDev <docker-admin@casjaysdev.pro>"
|
|
|
|
COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
|
|
COPY --from=build / /
|
|
|
|
VOLUME [ "/root","/data","/config" ]
|
|
|
|
ENTRYPOINT [ "tini","--","/usr/local/bin/entrypoint.sh" ]
|
|
HEALTHCHECK --interval=60s --timeout=30s --start-period=30s --retries=3 \
|
|
CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]
|