# syntax = docker/dockerfile:1.3-labs FROM debian:buster SHELL ["/bin/bash", "-o", "pipefail", "-c"] # install basics RUN apt-get update && \ apt-get install --no-install-recommends -y \ apt-transport-https \ apt-utils \ ca-certificates \ curl \ dumb-init \ gpg \ gpg-agent \ jq \ locales \ moreutils \ python3-minimal \ && \ rm -rf /var/cache/apt /var/lib/apt/lists/* ARG ADDITIONAL_KOPANO_PACKAGES="" # Both UID and GID should not be set to values above 999 ARG KOPANO_UID=999 ARG KOPANO_GID=999 ENV \ AUTOCONFIGURE=true \ BASE_VERSION=2.2.0 \ DEBIAN_FRONTEND=noninteractive \ DEBUG="" RUN mkdir -p /kopano/repo /kopano/data /kopano/helper /kopano/path WORKDIR /kopano/repo # Create kopano user and group RUN groupadd --system --gid ${KOPANO_GID} kopano RUN useradd --system --shell /usr/sbin/nologin --home /var/lib/kopano --gid ${KOPANO_GID} --uid ${KOPANO_UID} kopano ENV DOCKERIZE_VERSION v0.11.6 RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-"$(uname -s)"-"$(uname -m)" \ | install /dev/stdin /usr/local/bin/dockerize && \ dockerize --version ENV GOSS_VERSION v0.3.11 RUN curl -L https://github.com/aelsabbahy/goss/releases/download/$GOSS_VERSION/goss-linux-amd64 -o /usr/local/bin/goss && \ chmod +rx /usr/local/bin/goss && \ goss --version # if additional locales are required this should be adjusted here RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# nl_NL.UTF-8 UTF-8/nl_NL.UTF-8 UTF-8/' /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales && \ update-locale LANG=en_US.UTF-8 # get common utilities COPY kcconf.py defaultconfigs/ /kopano/ # add apt key for later use RUN --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=zokradonh/kopano_repo_helper \ APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /kopano/repo/Release.key # TODO: replace by org.opencontainers.image.* and set by GitHub Action instead of Dockerfile LABEL-instruction. Only set labels that might be useful in local builds LABEL maintainer=az@zok.xyz \ org.label-schema.name="Kopano base container" \ org.label-schema.description="Base image for containers running the Kopano groupware stack" \ org.label-schema.url="https://kopano.io" \ org.label-schema.vcs-url="https://github.com/zokradonh/kopano-docker" \ org.label-schema.version=$BASE_VERSION \ org.label-schema.schema-version="1.0" SHELL [ "/bin/bash", "-c"] ARG VCS_REF LABEL org.label-schema.vcs-ref=$VCS_REF