mirror of
				https://github.com/zokradonh/kopano-docker
				synced 2025-10-31 02:17:47 +00:00 
			
		
		
		
	touch the running system...
This commit is contained in:
		
							parent
							
								
									56805b05f0
								
							
						
					
					
						commit
						0f160d356e
					
				
							
								
								
									
										45
									
								
								.github/actions/build-component/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								.github/actions/build-component/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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: | ||||
|            | ||||
							
								
								
									
										64
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										64
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @ -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 | ||||
|  | ||||
							
								
								
									
										16
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								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 | ||||
| 
 | ||||
|  | ||||
| @ -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 | ||||
| @ -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 && \ | ||||
|  | ||||
							
								
								
									
										24
									
								
								gh_output_dockertags.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										24
									
								
								gh_output_dockertags.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,24 @@ | ||||
| #!/bin/bash | ||||
| 
 | ||||
| if [ $# -eq 0 ] | ||||
|   then | ||||
|     echo "Usage: version_dockertags.sh <component> [<distribution>] [<channel>] [<branch>]" | ||||
| 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)" | ||||
| 
 | ||||
| @ -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 | ||||
|  | ||||
| @ -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 \ | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -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 \ | ||||
|  | ||||
							
								
								
									
										64
									
								
								repo/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								repo/Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @ -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 <<SCRIPT | ||||
|     . /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" | ||||
|         dl_and_package_community "webapp" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH" | ||||
|         dl_and_package_community "files" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH" | ||||
|         dl_and_package_community "mdm" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH" | ||||
|         dl_and_package_community "smime" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH" | ||||
|         dl_and_package_community "meet" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH" | ||||
|     fi | ||||
| SCRIPT | ||||
| @ -61,4 +61,5 @@ function dl_and_package_community { | ||||
| 	cd "$component" | ||||
| 	apt-ftparchive packages . | gzip -9c > Packages.gz | ||||
| 	cd ".." | ||||
| 	echo "Downloaded and packaged component $component." | ||||
| } | ||||
| @ -15,7 +15,7 @@ function finish { | ||||
| } | ||||
| trap finish EXIT | ||||
| 
 | ||||
| source base/create-kopano-repo.sh | ||||
| source repo/create-kopano-repo.sh | ||||
| 
 | ||||
| component=${1:-core} | ||||
| distribution=${2:-Debian_10} | ||||
|  | ||||
| @ -5,27 +5,13 @@ FROM ${docker_repo}/kopano_php | ||||
| ARG ADDITIONAL_KOPANO_PACKAGES="" | ||||
| ARG ADDITIONAL_KOPANO_WEBAPP_PLUGINS="" | ||||
| ARG DEBIAN_FRONTEND=noninteractive | ||||
| ARG DOWNLOAD_COMMUNITY_PACKAGES=1 | ||||
| ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core" | ||||
| ARG KOPANO_CORE_VERSION=newest | ||||
| ARG KOPANO_REPOSITORY_FLAGS="trusted=yes" | ||||
| 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_WEBAPP_VERSION=newest | ||||
| 
 | ||||
| ENV \ | ||||
|     ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \ | ||||
|     ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$ADDITIONAL_KOPANO_WEBAPP_PLUGINS \ | ||||
|     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_WEBAPP_FILES_REPOSITORY_URL=$KOPANO_WEBAPP_FILES_REPOSITORY_URL \ | ||||
|     KOPANO_WEBAPP_MDM_REPOSITORY_URL=$KOPANO_WEBAPP_MDM_REPOSITORY_URL \ | ||||
|     KOPANO_WEBAPP_REPOSITORY_URL=$KOPANO_WEBAPP_REPOSITORY_URL \ | ||||
|     KOPANO_WEBAPP_SMIME_REPOSITORY_URL=$KOPANO_WEBAPP_SMIME_REPOSITORY_URL \ | ||||
|     KOPANO_WEBAPP_VERSION=$KOPANO_WEBAPP_VERSION \ | ||||
|     LANG=en_US.UTF-8 | ||||
| 
 | ||||
| @ -42,19 +28,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||||
| # install Kopano WebApp | ||||
| # hadolint ignore=SC2129 | ||||
| RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \ | ||||
|     # community download and package as apt source repository | ||||
|     # TODO is it neccesary to source this file here? was already sourced before | ||||
|     . /kopano/helper/create-kopano-repo.sh && \ | ||||
|     if [ ${DOWNLOAD_COMMUNITY_PACKAGES} -eq 1 ]; then \ | ||||
|         dl_and_package_community "webapp" "Debian_10"; \ | ||||
|         dl_and_package_community "files" "Debian_10"; \ | ||||
|         dl_and_package_community "mdm" "Debian_10"; \ | ||||
|         dl_and_package_community "smime" "Debian_10"; \ | ||||
|     fi; \ | ||||
|     echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_REPOSITORY_URL} ./" >> /etc/apt/sources.list.d/kopano.list; \ | ||||
|     echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_SMIME_REPOSITORY_URL} ./" >> /etc/apt/sources.list.d/kopano.list; \ | ||||
|     echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_MDM_REPOSITORY_URL} ./" >> /etc/apt/sources.list.d/kopano.list; \ | ||||
|     echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_WEBAPP_FILES_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 \ | ||||
|  | ||||
| @ -3,21 +3,13 @@ ARG docker_repo=zokradonh | ||||
| 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 | ||||
| ARG KOPANO_ZPUSH_REPOSITORY_URL="https://download.kopano.io/zhub/z-push:/final/Debian_10/" | ||||
| ARG KOPANO_ZPUSH_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_ZPUSH_REPOSITORY_URL=$KOPANO_ZPUSH_REPOSITORY_URL \ | ||||
|     KOPANO_ZPUSH_VERSION=$KOPANO_ZPUSH_VERSION \ | ||||
|     LANG=en_US.UTF-8 | ||||
| 
 | ||||
| @ -37,10 +29,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||||
| # 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 \ | ||||
|     # prepare z-push installation | ||||
|     echo "deb ${KOPANO_ZPUSH_REPOSITORY_URL} /" > /etc/apt/sources.list.d/zpush.list && \ | ||||
|     # this is the same key as for the rest of the Kopano stack, making a separate download anyways as this may not be the case in the future  | ||||
|     curl -s -S -L -o - "${KOPANO_ZPUSH_REPOSITORY_URL}/Release.key" | apt-key add - && \ | ||||
|     --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 && \ | ||||
|     # TODO set IGNORE_FIXSTATES_ON_UPGRADE https://jira.z-hub.io/browse/ZP-1164 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user