diff --git a/.github/actions/build-component/action.yml b/.github/actions/build-component/action.yml new file mode 100644 index 0000000..1d36002 --- /dev/null +++ b/.github/actions/build-component/action.yml @@ -0,0 +1,45 @@ +name: kopano-docker-image-build +author: zokradonh +description: Provides a template to build all docker images in zokradonh/kopano-docker. This Action builds only one docker image. +inputs: + push: + description: 'If the image should be pushed to registry' + required: false + default: false + component: + description: 'The directory of the component in the repo where the respective Dockerfile is' + required: true + tags: + description: 'Version tags' + required: false + # channel: + # description: 'Kopano software channel like "community" or "supported"' + # required: false + # default: 'community' + # distribution: + # description: 'OS distribution which is used in the kopano package file name.' + # required: false + # default: 'Debian_10' + # branch: + # description: 'Kopano Branch of supported build. Only used in supported builds' + # required: false + # default: '' +runs: + using: "composite" + steps: + - uses: docker/build-push-action@v2 + with: + push: ${{ inputs.push }} + tags: ${{ inputs.tags }} + #labels: # TODO: use metadata array from input + # TODO: move from build arg to direct label: + # - VCS-REF + # - service version (may be given to Dockerfile) + context: ${{ inputs.component }} + build-args: | + ADDITIONAL_KOPANO_PACKAGES= + ADDITIONAL_KOPANO_WEBAPP_PLUGINS= + KOPANO_UID=999 + KOPANO_GID=999 + secret-files: + \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c513e17..6e0998e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,14 +7,19 @@ on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: - - master + - pipeline # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +env: + ADDITIONAL_KOPANO_PACKAGES: + ADDITIONAL_KOPANO_WEBAPP_PLUGINS: + KOPANO_UID: 999 + KOPANO_GID: 999 + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" docker: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -35,19 +40,44 @@ jobs: # tests/test.exp # ./version.sh # commander test tests/commander.yaml - - name: Build all images - env: - docker_repo: ${{ secrets.DOCKERHUB_REPO }} - DOCKERREADME: yes + - name: Prepare Kopano APT Packages + uses: docker/build-push-action@v2 + with: + push: false + tags: kopano_repo_helper + context: repo + - name: Extract Version information + id: kopano_versions run: | - make build-core #build-all - # change to docker/build-push-action templated by a local custom composite GitHub Action - - - name: Test - run: | - echo "KCCONF_SERVER_SURVEYCLIENT_INTERVAL=0" >> kopano_server.env - echo "KOPANO_SURVEYCLIENT_ENABLED=false" >> kopano_konnect.env - echo "KOPANO_SURVEYCLIENT_ENABLED=false" >> kopano_kwmserver.env - make test-ci - docker-compose down -v - make test-startup-meet-demo + ./gh_output_dockertags.sh core + ./gh_output_dockertags.sh webapp + ./gh_output_dockertags.sh kapps + ./gh_output_dockertags.sh meet + ./gh_output_dockertags.sh zpush + - uses: ./.github/actions/build-component + with: + push: false + component: base + - uses: ./.github/actions/build-component + with: + push: false + component: core + tags: ${{ steps.kopano_versions.outputs.core_version_tags }} + - uses: ./.github/actions/build-component + with: + push: false + component: webapp + tags: ${{ steps.kopano_versions.outputs.webapp_version_tags }} + - uses: ./.github/actions/build-component + with: + push: false + component: zpush + tags: ${{ steps.kopano_versions.outputs.zpush_version_tags }} + # - name: Test + # run: | + # echo "KCCONF_SERVER_SURVEYCLIENT_INTERVAL=0" >> kopano_server.env + # echo "KOPANO_SURVEYCLIENT_ENABLED=false" >> kopano_konnect.env + # echo "KOPANO_SURVEYCLIENT_ENABLED=false" >> kopano_kwmserver.env + # make test-ci + # docker-compose down -v + # make test-startup-meet-demo diff --git a/Makefile b/Makefile index f9daee2..5428294 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,20 @@ all: build-all build-all: make $(shell grep -o ^build-.*: Makefile | grep -Ev 'build-all|build-simple|build-builder|build-webapp-demo|build-webapp-plugins' | uniq | sed s/://g | xargs) +.PHONY: repo +build-repo: + BUILDKIT_PROGRESS=plain DOCKER_BUILDKIT=1 docker build --rm \ + --build-arg KOPANO_CORE_REPOSITORY_URL=$(KOPANO_CORE_REPOSITORY_URL) \ + --build-arg KOPANO_KAPPS_REPOSITORY_URL=$(KOPANO_KAPPS_REPOSITORY_URL) \ + --build-arg KOPANO_MEET_REPOSITORY_URL=$(KOPANO_MEET_REPOSITORY_URL) \ + --build-arg KOPANO_WEBAPP_FILES_REPOSITORY_URL=$(KOPANO_WEBAPP_FILES_REPOSITORY_URL) \ + --build-arg KOPANO_WEBAPP_MDM_REPOSITORY_URL=$(KOPANO_WEBAPP_MDM_REPOSITORY_URL) \ + --build-arg KOPANO_WEBAPP_REPOSITORY_URL=$(KOPANO_WEBAPP_REPOSITORY_URL) \ + --build-arg KOPANO_WEBAPP_SMIME_REPOSITORY_URL=$(KOPANO_WEBAPP_SMIME_REPOSITORY_URL) \ + --build-arg KOPANO_ZPUSH_REPOSITORY_URL=$(KOPANO_ZPUSH_REPOSITORY_URL) \ + --build-arg DOWNLOAD_COMMUNITY_PACKAGES=$(DOWNLOAD_COMMUNITY_PACKAGES) \ + -t kopano_repo_helper repo/ + .PHONY: build build: component ?= base build: ## Helper target to build a given image. Defaults to the "base" image. @@ -116,7 +130,7 @@ endif --cache-from $(docker_repo)/kopano_$(component):builder \ -t $(docker_repo)/kopano_$(component):builder $(component)/ -build-base: ## Build new base image. +build-base: build-repo ## Build new base image. docker pull debian:buster component=base make build diff --git a/base/Dockerfile b/base/Dockerfile index 617ade4..38dc0f6 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,34 +1,8 @@ +# syntax = docker/dockerfile:1.3-labs FROM debian:buster -ARG ADDITIONAL_KOPANO_PACKAGES="" -ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" -ARG KOPANO_CORE_VERSION=newest -ARG KOPANO_REPOSITORY_FLAGS="" - -# 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="" - -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", "-o", "pipefail", "-c"] -RUN mkdir -p /kopano/repo /kopano/data /kopano/helper /kopano/path -WORKDIR /kopano/repo - # install basics RUN apt-get update && \ apt-get install --no-install-recommends -y \ @@ -46,6 +20,21 @@ RUN apt-get update && \ && \ 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 @@ -68,24 +57,22 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ update-locale LANG=en_US.UTF-8 # get common utilities -COPY create-kopano-repo.sh /kopano/helper/ -COPY kcconf.py Release.key defaultconfigs/ /kopano/ -RUN apt-key add /kopano/Release.key +COPY kcconf.py defaultconfigs/ /kopano/ +# add apt key for later use +RUN --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=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"] -ONBUILD ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ONBUILD ARG DOWNLOAD_DISTRIBUTION="Debian_10" -ONBUILD ARG DOWNLOAD_CHANNEL="community" -ONBUILD ARG DOWNLOAD_BRANCH="" -ONBUILD WORKDIR /kopano/repo -ONBUILD RUN \ - # community download and package as apt source repository - . /kopano/helper/create-kopano-repo.sh && \ - if [ ${DOWNLOAD_COMMUNITY_PACKAGES} -eq 1 ]; then \ - dl_and_package_community "core" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH"; \ - dl_and_package_community "kapps" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH"; \ - fi - ARG VCS_REF LABEL org.label-schema.vcs-ref=$VCS_REF \ No newline at end of file diff --git a/core/Dockerfile b/core/Dockerfile index 3670146..2117439 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -3,29 +3,19 @@ ARG docker_repo=zokradonh FROM ${docker_repo}/kopano_base ARG ADDITIONAL_KOPANO_PACKAGES="" -ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" ARG DEBIAN_FRONTEND=noninteractive -ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" ARG KOPANO_CORE_VERSION=newest -ARG KOPANO_KAPPS_REPOSITORY_URL="file:/kopano/repo/kapps" ARG KOPANO_KAPPS_VERSION=newest ENV \ ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \ - DOWNLOAD_BRANCH="" \ - DOWNLOAD_CHANNEL="community" \ - DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \ - DOWNLOAD_DISTRIBUTION="Debian_10" \ GRAPI_BACKEND="kopano" \ KCCONF_GRAPI_LDAP_BASEDN="" \ KCCONF_GRAPI_LDAP_BINDDN="" \ KCCONF_GRAPI_LDAP_BINDPW_FILE="" \ KCCONF_GRAPI_LDAP_URI="" \ KOPANO_CONFIG_PATH=/tmp/kopano \ - KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \ KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \ - KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS \ LANG=en_US.UTF-8 \ SERVICE_TO_START=server @@ -40,12 +30,9 @@ LABEL maintainer=az@zok.xyz \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # install Kopano Core and refresh ca-certificates -# hadolint currently does not understand the extended buildkit syntax https://github.com/hadolint/hadolint/issues/347 -# hadolint ignore=DL3015 RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \ - # apt key for this repo has already been installed in base - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \ - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_KAPPS_REPOSITORY_URL} ./" >> /etc/apt/sources.list.d/kopano.list; \ + --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=kopano_repo_helper \ + --mount=type=bind,target=/etc/apt/sources.list.d/,source=/etc/apt/sources.list.d/,from=kopano_repo_helper \ # install apt-get update && \ set -x && \ diff --git a/gh_output_dockertags.sh b/gh_output_dockertags.sh new file mode 100755 index 0000000..bb64fe6 --- /dev/null +++ b/gh_output_dockertags.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +if [ $# -eq 0 ] + then + echo "Usage: version_dockertags.sh [] [] []" +fi + +function version_to_tags { + version=$1 + result=$version + + while [[ $version == *.* ]]; do \ + version=${version%.*} ; \ + result="$result,$version" + done + + echo $result +} + +version="$( ./version.sh $@ )" + +echo "::set-output name=$1_version::$version" +echo "::set-output name=$1_version_tags::$(version_to_tags $version)" + diff --git a/kapps/Dockerfile b/kapps/Dockerfile index 29ef005..07e5f51 100644 --- a/kapps/Dockerfile +++ b/kapps/Dockerfile @@ -3,21 +3,14 @@ ARG docker_repo=zokradonh FROM ${docker_repo}/kopano_base:latest ARG ADDITIONAL_KOPANO_PACKAGES="" -ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" ARG DEBIAN_FRONTEND=noninteractive -ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" ARG KOPANO_CORE_VERSION=newest -ARG KOPANO_KAPPS_REPOSITORY_URL="file:/kopano/repo/kapps" ARG KOPANO_KAPPS_VERSION=newest ENV \ ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \ - DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \ - KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \ KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \ - KOPANO_KAPPS_VERSION=$KOPANO_KAPPS_VERSION \ - KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS + KOPANO_KAPPS_VERSION=$KOPANO_KAPPS_VERSION LABEL maintainer=az@zok.xyz \ org.label-schema.name="Kopano apps container" \ @@ -30,8 +23,8 @@ LABEL maintainer=az@zok.xyz \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \ - # apt key for this repo has already been installed in base - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_KAPPS_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \ + --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=kopano_repo_helper \ + --mount=type=bind,target=/etc/apt/sources.list.d/,source=/etc/apt/sources.list.d/,from=kopano_repo_helper \ # install apt-get update && \ # TODO mime-support could be remove once its an official dependency of kopano-kwebd diff --git a/kdav/Dockerfile b/kdav/Dockerfile index 29b2a79..0ec380a 100644 --- a/kdav/Dockerfile +++ b/kdav/Dockerfile @@ -9,18 +9,12 @@ RUN composer install FROM ${docker_repo}/kopano_php ARG ADDITIONAL_KOPANO_PACKAGES="" -ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" ARG DEBIAN_FRONTEND=noninteractive -ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" ARG KOPANO_CORE_VERSION=newest ENV \ ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \ - DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \ - KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \ - KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \ - KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS + KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION LABEL maintainer=az@zok.xyz \ org.label-schema.name="Kopano kDAV container" \ @@ -31,6 +25,8 @@ LABEL maintainer=az@zok.xyz \ # install Kopano kDAV RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \ + --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=kopano_repo_helper \ + --mount=type=bind,target=/etc/apt/sources.list.d/,source=/etc/apt/sources.list.d/,from=kopano_repo_helper \ set -x && \ apt-get update && apt-get install -y --no-install-recommends \ php-mbstring \ diff --git a/meet/Dockerfile b/meet/Dockerfile index 051a17c..5101369 100644 --- a/meet/Dockerfile +++ b/meet/Dockerfile @@ -3,21 +3,14 @@ ARG docker_repo=zokradonh FROM ${docker_repo}/kopano_base:latest ARG ADDITIONAL_KOPANO_PACKAGES="" -ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" ARG DEBIAN_FRONTEND=noninteractive -ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" ARG KOPANO_CORE_VERSION=newest -ARG KOPANO_MEET_REPOSITORY_URL="file:/kopano/repo/meet" ARG KOPANO_MEET_VERSION=newest ENV KOPANO_MEET_VERSION=$KOPANO_MEET_VERSION ENV \ ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \ - DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \ - KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \ KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \ - KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS \ SERVICE_TO_START=meet LABEL maintainer=az@zok.xyz \ @@ -31,13 +24,8 @@ LABEL maintainer=az@zok.xyz \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \ - # apt key for this repo has already been installed in base - # community download and package as apt source repository - . /kopano/helper/create-kopano-repo.sh && \ - if [ ${DOWNLOAD_COMMUNITY_PACKAGES} -eq 1 ]; then \ - dl_and_package_community "meet"; \ - fi; \ - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_MEET_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \ + --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=kopano_repo_helper \ + --mount=type=bind,target=/etc/apt/sources.list.d/,source=/etc/apt/sources.list.d/,from=kopano_repo_helper \ # install apt-get update && \ # TODO mime-support could be remove once its an official dependency of kopano-kwebd diff --git a/php/Dockerfile b/php/Dockerfile index ce76c1e..0fe1794 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -3,20 +3,13 @@ ARG docker_repo=zokradonh FROM ${docker_repo}/kopano_base ARG ADDITIONAL_KOPANO_PACKAGES="" -ARG DOWNLOAD_COMMUNITY_PACKAGES=1 -ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" ARG DEBIAN_FRONTEND=noninteractive -ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" ARG KOPANO_CORE_VERSION=newest -ARG KOPANO_KAPPS_REPOSITORY_URL="file:/kopano/repo/kapps" ARG KOPANO_KAPPS_VERSION=newest ENV \ ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \ - DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \ - KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \ - KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \ - KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS + KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION LABEL maintainer=az@zok.xyz \ org.label-schema.name="Kopano php container" \ @@ -30,9 +23,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # add install common php dependencies RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \ - # apt key for this repo has already been installed in base - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \ - echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_KAPPS_REPOSITORY_URL} ./" >> /etc/apt/sources.list.d/kopano.list; \ + --mount=type=bind,target=/kopano/repo,source=/kopano/repo,from=kopano_repo_helper \ + --mount=type=bind,target=/etc/apt/sources.list.d/,source=/etc/apt/sources.list.d/,from=kopano_repo_helper \ # install set -x && \ apt-get update && apt-get install -y --no-install-recommends \ diff --git a/repo/Dockerfile b/repo/Dockerfile new file mode 100644 index 0000000..dc029e0 --- /dev/null +++ b/repo/Dockerfile @@ -0,0 +1,64 @@ +# syntax = docker/dockerfile:1.3-labs +FROM debian:buster + +# install basics +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + apt-utils \ + ca-certificates \ + curl \ + gpg \ + gpg-agent \ + jq \ + locales \ + moreutils \ + && \ + rm -rf /var/cache/apt /var/lib/apt/lists/* + +ARG DOWNLOAD_COMMUNITY_PACKAGES=1 +ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" +ARG KOPANO_KAPPS_REPOSITORY_URL="file:/kopano/repo/kapps" +ARG KOPANO_MEET_REPOSITORY_URL="file:/kopano/repo/meet" +ARG KOPANO_WEBAPP_FILES_REPOSITORY_URL="file:/kopano/repo/files" +ARG KOPANO_WEBAPP_MDM_REPOSITORY_URL="file:/kopano/repo/mdm" +ARG KOPANO_WEBAPP_REPOSITORY_URL="file:/kopano/repo/webapp" +ARG KOPANO_WEBAPP_SMIME_REPOSITORY_URL="file:/kopano/repo/smime" +ARG KOPANO_ZPUSH_REPOSITORY_URL="https://download.kopano.io/zhub/z-push:/final/Debian_10/" +ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" +ARG DOWNLOAD_BRANCH="" +ARG DOWNLOAD_CHANNEL="community" +ARG DOWNLOAD_DISTRIBUTION="Debian_10" + +ARG DEBUG="" + + +COPY create-kopano-repo.sh /kopano/helper/ +COPY Release.key /kopano/repo/ + +COPY <<-FILE /etc/apt/sources.list.d/kopano.list + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_KAPPS_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_MEET_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_SMIME_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_MDM_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_FILES_REPOSITORY_URL} ./ + deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_ZPUSH_REPOSITORY_URL} / +FILE + +WORKDIR /kopano/repo + +SHELL [ "/bin/bash", "-c"] + +RUN <