This is a self deploying container for running a Univention Corporate Server (UCS) with the role of primary, backup, replica directory node or managed node.
CLI SYNTAX:
KEY=VALUE; ...; \
COMMAND \
--<COMMAND OPTION(S)> \
<COMMAND ARGUMENT(S)>
...
STDOUT ( succeed )
...
STDOUT ( timeing )
...
CONTAINER=sdc.ucs.example; IMAGE=univention-corporate-server; STAGE=export; TAG=latest; \
docker stop ${CONTAINER} && \
docker export ${CONTAINER} | \
docker import - \
${IMAGE}:${STAGE}
This will also clean the whole Docker in Docker environment! (rm -rfv /var/lib/docker/* /var/lib/containerd/*)
CONTAINER=sdc.ucs.example; IMAGE=univention-corporate-server; STAGE=export; TAG=latest; \
docker build \
--build-arg COMMENT="$(docker image inspect --format '{{.Comment}}' univention-corporate-server-debootstrap:latest)" \
--build-arg CONTAINER=${CONTAINER} \
--build-arg DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--build-arg IMAGE=${IMAGE} \
--build-arg STAGE=${STAGE} \
--build-arg TAG=${TAG} \
--tag ${CONTAINER}:${TAG} \
--file clean.environment.Dockerfile .
Inspect the new image.
CONTAINER=sdc.ucs.example; TAG=latest; \
docker image inspect ${CONTAINER}:${TAG} && \
docker image inspect --format '{{ index .Config.Labels "org.label-schema.docker.cmd"}}' ${CONTAINER}:${TAG}
CONTAINER=sdc.ucs.example; TAG=latest; \
docker rm \
--force \
--volumes \
${CONTAINER} && \
$(docker image inspect --format '{{ index .Config.Labels "org.label-schema.docker.cmd"}}' ${CONTAINER}:${TAG})