finaliser runphp
This commit is contained in:
parent
f465b3b175
commit
2e6c8219df
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG NDIST=12
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/php AS php
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim AS builder
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=base /src/ /src/
|
||||
RUN /g/build core lite _builder
|
||||
RUN /g/build _su-exec_builder
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=builder /src/su-exec/su-exec /g/
|
||||
RUN /g/build
|
||||
|
||||
COPY --from=php /g/ /g/
|
||||
RUN /g/build -a @adminer
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,40 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG NDIST=12
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/instantclient AS instantclient
|
||||
FROM $REGISTRY/src/php AS php
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim AS builder
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=base /src/ /src/
|
||||
RUN /g/build core lite _builder
|
||||
RUN /g/build _su-exec_builder
|
||||
|
||||
COPY --from=instantclient /g/ /g/
|
||||
COPY --from=instantclient /src/ /src/
|
||||
RUN /g/build _instantclient_builder
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=builder /src/su-exec/su-exec /g/
|
||||
RUN /g/build
|
||||
|
||||
COPY --from=php /g/ /g/
|
||||
RUN /g/build -a @adminer
|
||||
|
||||
COPY --from=instantclient /g/ /g/
|
||||
COPY --from=builder /opt/oracle/ /opt/oracle/
|
||||
RUN /g/build instantclient
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/mariadb AS mariadb
|
||||
FROM $REGISTRY/src/legacytools AS legacytools
|
||||
|
||||
FROM mariadb:10
|
||||
ARG APT_PROXY TIMEZONE
|
||||
ENV APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=mariadb /g/ /g/
|
||||
RUN /g/build -a @base @mariadb
|
||||
|
||||
COPY --from=legacytools /g/ /g/
|
||||
RUN /g/build nutools servertools
|
||||
|
||||
EXPOSE 3306
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG NDIST=12
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/php AS php
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim AS builder
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=base /src/ /src/
|
||||
RUN /g/build core lite _builder
|
||||
RUN /g/build _su-exec_builder
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=builder /src/su-exec/su-exec /g/
|
||||
RUN /g/build
|
||||
|
||||
COPY --from=php /g/ /g/
|
||||
RUN /g/build -a @apache-php-cas php-utils
|
||||
|
||||
EXPOSE 80 443
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,44 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG NDIST=12
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/legacytools AS legacytools
|
||||
FROM $REGISTRY/src/instantclient AS instantclient
|
||||
FROM $REGISTRY/src/php AS php
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim AS builder
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=base /src/ /src/
|
||||
RUN /g/build core lite _builder
|
||||
RUN /g/build _su-exec_builder
|
||||
|
||||
COPY --from=instantclient /g/ /g/
|
||||
COPY --from=instantclient /src/ /src/
|
||||
RUN /g/build _instantclient_builder
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=builder /src/su-exec/su-exec /g/
|
||||
RUN /g/build
|
||||
|
||||
COPY --from=legacytools /g/ /g/
|
||||
RUN /g/build nutools
|
||||
|
||||
COPY --from=php /g/ /g/
|
||||
RUN /g/build -a @apache-php-cas php-utils
|
||||
|
||||
COPY --from=instantclient /g/ /g/
|
||||
COPY --from=builder /opt/oracle/ /opt/oracle/
|
||||
RUN /g/build instantclient
|
||||
|
||||
EXPOSE 80 443
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG NDIST=12
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/php AS php
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim AS builder
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=base /src/ /src/
|
||||
RUN /g/build core lite _builder
|
||||
RUN /g/build _su-exec_builder
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=builder /src/su-exec/su-exec /g/
|
||||
RUN /g/build
|
||||
|
||||
COPY --from=php /g/ /g/
|
||||
RUN /g/build @php-cli php-utils
|
||||
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,43 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG NDIST=12
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/legacytools AS legacytools
|
||||
FROM $REGISTRY/src/instantclient AS instantclient
|
||||
FROM $REGISTRY/src/php AS php
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim AS builder
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=base /src/ /src/
|
||||
RUN /g/build core lite _builder
|
||||
RUN /g/build _su-exec_builder
|
||||
|
||||
COPY --from=instantclient /g/ /g/
|
||||
COPY --from=instantclient /src/ /src/
|
||||
RUN /g/build _instantclient_builder
|
||||
|
||||
################################################################################
|
||||
FROM debian:${NDIST}-slim
|
||||
ARG APT_MIRROR SEC_MIRROR APT_PROXY TIMEZONE
|
||||
ENV APT_MIRROR=$APT_MIRROR SEC_MIRROR=$SEC_MIRROR APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=builder /src/su-exec/su-exec /g/
|
||||
RUN /g/build
|
||||
|
||||
COPY --from=legacytools /g/ /g/
|
||||
RUN /g/build nutools
|
||||
|
||||
COPY --from=php /g/ /g/
|
||||
RUN /g/build @php-cli php-utils
|
||||
|
||||
COPY --from=instantclient /g/ /g/
|
||||
COPY --from=builder /opt/oracle/ /opt/oracle/
|
||||
RUN /g/build instantclient
|
||||
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
ARG REGISTRY=pubdocker.univ-reunion.fr
|
||||
FROM $REGISTRY/src/base AS base
|
||||
FROM $REGISTRY/src/postgres AS postgres
|
||||
|
||||
FROM postgres:15-bookworm
|
||||
ARG APT_PROXY TIMEZONE
|
||||
ENV APT_PROXY=$APT_PROXY TIMEZONE=$TIMEZONE
|
||||
|
||||
COPY --from=base /g/ /g/
|
||||
COPY --from=postgres /g/ /g/
|
||||
RUN /g/build -a @base @postgres
|
||||
RUN /g/pkg i @ssl @git
|
||||
|
||||
EXPOSE 5432
|
||||
ENTRYPOINT ["/g/entrypoint"]
|
|
@ -72,9 +72,9 @@ function _build() {
|
|||
dockerfiles=(
|
||||
"$MYDIR/Dockerfile.$1.local"
|
||||
"$MYDIR/Dockerfile.$1$BUILD_FLAVOUR"
|
||||
"$PROJDIR/$VENDORDIR/nulib/php/support/Dockerfile.$1$BUILD_FLAVOUR"
|
||||
"$PROJDIR/$VENDORDIR/nulib/php/dockerfiles/Dockerfile.$1$BUILD_FLAVOUR"
|
||||
"$MYDIR/Dockerfile.$1"
|
||||
"$PROJDIR/$VENDORDIR/nulib/php/support/Dockerfile.$1"
|
||||
"$PROJDIR/$VENDORDIR/nulib/php/dockerfiles/Dockerfile.$1"
|
||||
)
|
||||
for dockerfile in "${dockerfiles[@]}"; do
|
||||
[ -f "$dockerfile" ] && break
|
||||
|
|
|
@ -202,7 +202,8 @@ if [ -z "$_RUNDK_IN_DOCKER" ]; then
|
|||
after_source_buildenv
|
||||
fi
|
||||
if [ -z "$IMAGE" ]; then
|
||||
[ -n "$PRIVAREG" ] && IMAGE="$PRIVAREG/$IMAGENAME:$DIST" || IMAGE="$REGISTRY/$IMAGENAME:$DIST"
|
||||
[[ "$IMAGENAME" == */ ]] && imagename=runphp || imagename="${IMAGENAME%/*}/runphp"
|
||||
[ -n "$PRIVAREG" ] && IMAGE="$PRIVAREG/$imagename:$DIST" || IMAGE="$REGISTRY/$imagename:$DIST"
|
||||
fi
|
||||
if [ -z "$(docker image ls --no-trunc --format '{{.Repository}}:{{.Tag}}' "$IMAGE" 2>/dev/null)" ]; then
|
||||
bootstrap=1
|
||||
|
@ -300,7 +301,8 @@ OPTIONS
|
|||
fi
|
||||
[ -n "$Dist" ] && DIST="$Dist"
|
||||
if [ -z "$IMAGE" ]; then
|
||||
[ -n "$PRIVAREG" ] && IMAGE="$PRIVAREG/$IMAGENAME:$DIST" || IMAGE="$REGISTRY/$IMAGENAME:$DIST"
|
||||
[[ "$IMAGENAME" == */ ]] && imagename=runphp || imagename="${IMAGENAME%/*}/runphp"
|
||||
[ -n "$PRIVAREG" ] && IMAGE="$PRIVAREG/$imagename:$DIST" || IMAGE="$REGISTRY/$imagename:$DIST"
|
||||
fi
|
||||
if [ -z "$UnlessExists" -o -z "$(docker image ls --no-trunc --format '{{.Repository}}:{{.Tag}}' "$IMAGE" 2>/dev/null)" ]; then
|
||||
eecho "== Building $IMAGE"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
# Modèle de script utilisant runphp pour lancer un traitement dans un container
|
||||
# RUNPHP est le chemin relatif vers runphp à partir du chemin du script
|
||||
RUNPHP=sbin/runphp
|
||||
|
||||
MYDIR="$(dirname -- "$0")"; MYNAME="$(basename -- "$0")"
|
||||
if [ -z "$_RUNPHP_IN_DOCKER" ]; then
|
||||
"$MYDIR/$RUNPHP" --bs --ue --ci || exit 1
|
||||
exec "$MYDIR/$RUNPHP" "$0" "$@"
|
||||
fi
|
||||
source "$MYDIR/$RUNPHP" || exit 1
|
||||
source "$PROJDIR/$VENDORDIR/nulib/php/load.sh" || exit 1
|
||||
|
||||
args=(
|
||||
"description"
|
||||
#"usage"
|
||||
)
|
||||
parse_args "$@"; set -- "${args[@]}"
|
||||
|
||||
echo "je tourne dans un container..."
|
||||
sleep 1000
|
Loading…
Reference in New Issue