Skip to content
Unofficial Kopano Docker images for all Kopano services.
Branch: master
Clone or download
fbartels the mime type error was thrown since the meet container did not have …
…the mime-support package (#205)

Signed-off-by: Felix Bartels <felix@host-consultants.de>
Latest commit 3b8c9c4 Jul 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis update descriptions on docker hub (#191) Jun 23, 2019
base fail make target when docker wait returns with non zero output (#184) Jun 15, 2019
build
core Add softdelete and backup to scheduler (#189) Jun 21, 2019
examples Add linting for yaml files (#186) Jun 19, 2019
kdav transition to all versions numbers in labels (#175) Jun 11, 2019
konnect Update konnect and kwmserver (#204) Jul 12, 2019
kwmserver Update konnect and kwmserver (#204) Jul 12, 2019
ldap transition to all versions numbers in labels (#175) Jun 11, 2019
ldap_demo transition to all versions numbers in labels (#175) Jun 11, 2019
meet the mime type error was thrown since the meet container did not have … Jul 12, 2019
php fail make target when docker wait returns with non zero output (#184) Jun 15, 2019
playground transition to all versions numbers in labels (#175) Jun 11, 2019
python fail make target when docker wait returns with non zero output (#184) Jun 15, 2019
scheduler transition to all versions numbers in labels (#175) Jun 11, 2019
ssl transition to all versions numbers in labels (#175) Jun 11, 2019
tests uncomment kopano-cli as its back in master Jun 24, 2019
utils transition to all versions numbers in labels (#175) Jun 11, 2019
web the mime type error was thrown since the meet container did not have … Jul 12, 2019
webapp
zpush fail make target when docker wait returns with non zero output (#184) Jun 15, 2019
.editorconfig Forgot last newline Dec 13, 2018
.gitignore prepare automatic security scanning (#122) May 27, 2019
.gitmodules rework current front facing proxy (#40) Dec 1, 2018
.hadolint.yaml add linting for shell scripts and Dockerfiles Mar 14, 2019
.travis.yml
.trivyignore prepare automatic security scanning (#122) May 27, 2019
.yamllint
LICENSE Multiple Repo to Single Repo. Squashed some layers. Apr 16, 2018
Makefile update descriptions on docker hub (#191) Jun 23, 2019
README.md add some troubleshooting advice (#201) Jul 11, 2019
docker-compose.ports.yml Make it possible for users to customise exposed ports (#182) Jun 23, 2019
docker-compose.yml Use login via oidc in Kopano WebApp by default (#203) Jul 11, 2019
setup-update-tag.sh use version sort for proper ordering (#180) Jun 13, 2019
setup.sh Make it possible for users to customise exposed ports (#182) Jun 23, 2019
test.exp
version.sh smaller improvements to setup.sh (#153) May 31, 2019

README.md

(unofficial) Kopano Docker Images

Build Status

This repository contains an easy to replicate recipe to spin up a Kopano demo environment, which can (through modification of .env and possibly docker-compose.yml/docker-compose.override.yml) also be used for production environments.

How to get started?

  • make sure that you are running at least Docker 17.06.0 and Docker Compose 1.19.0.
  • clone this repository to your local disk
  • run setup.sh
    • this script will ask you a few questions about your environment.
    • If you are just interested in the demo environment you can accept the default values by pressing Enter on each question
  • now run docker-compose up and you will see how the remaining Docker images are pulled and then everything is started
  • after startup has succeeded you can access the Kopano WebApp by going to https://kopano.demo/webapp
  • there are already some users created in the demo ldap. These users all have a password that is identical to the username, e.g. the password for user1 user user1.
  • you can also access phpLDAPadmin by going to https://kopano.demo/ldap-admin
    • you can access the ldap-admin web frontent in readonly mode with: LDAP_BIND_DN env var as login dn and the LDAP_BIND_PW env var provided by the .env file (which is generated by the setup.sh)
    • if you want to modify the ldap content you can access the ldap-admin web frontend by using the cn=admin, appending the LDAP_BASE_DN env var as the login dn and LDAP_ADMIN_PASSWORD as the password
    • lookup kopano documentation on how to manage users using the ldap interface: https://documentation.kopano.io/kopanocore_administrator_manual/user_management.html#user-management-from-openldap

Note: There have been reports about the ldap demo not starting up on MacOS. It is recommended to use a Linux OS if you want to use the bundled LDAP image.

The docker-compose.yml file by default pulls Docker containers from https://hub.docker.com/r/zokradonh/kopano_core/ and https://hub.docker.com/r/zokradonh/kopano_webapp/. These images are based on the Kopano nightly builds and will contain the latest version available from the time the image was built.

Troubleshooting

If you are running into a problem please include the following issues in the description of your report:

  • the error message produced when running docker-compose up
  • the output of docker-compose ps
  • for failed containers the output of docker-compose logs $containername
  • the contents of your .env
  • the output of docker-compose config

Please make sure to remove sensitive data (for example your real hostname or passwords for accounts) when posting these information publicly.

If you have problems or questions about Kopano in general then either get in contact with the Kopano support (if you have a valid subscription) or start a topic on the Kopano forum.

Updating

The used docker-compose.yml is part of the git versioning. Which mean all changes in this repository will also be applied to your local data once you pull in the latest version. If you need to configure additional env variables, this can now be done in the additional env files (more details further below, for example for kopano_server this file is called kopano_server.env). If you only want to run a subset of containers it is recommended to create a copy of docker-compose.yml and specify your copy when running. e.g. like ´docker-compose -f my-setup.yml up -d´.

Is this project also interesting for me when I already have a (non-Docker) Kopano environment?

Yes, indeed. You could for example use this to easily try out newer Kopano WebApp or Z-Push releases, without touching your production environment. Through the zokradonh/kopano_core image you could even try out newer version of e.g. kopano-gateway without jumping into a dependecy mess in your production environment.

And last but not least this project also offers a zokradonh/kopano_utils image to easily run tools such as kopano-backup, kopano-migration-pst, kopano-migration-imap and all the other utilities that are bundles with Kopano. See below to see how to run zokradonh/kopano_utils.

Additional configuration / Need to adjust any values after the initial run of setup.sh?

If you want to modify some of the values from the setup.sh run you can simply edit .env in your favourite editor. Repeated runs of setup.sh will neither modify docker-compose.yml nor .env. In the ´.env´ file you will also find some given defaults like ldap query filters and the local ports for the reverse proxy.

Additionally a dedicated env file is created for each container (at least where that would make sense). The env file has the container name as part of the file name. For example for the kopano_server container the filename is named kopano_server.env. These additional env files are auto created when running setup.sh.

Any additional configuration should be done through environment variables and not done in the actual container. The images working with configuration files (e.g. kopano_core, kopano_webapp, kopano_meet) have a mechanism built in to translate env variables into configuration files. For services that can directly work with env variables (e.g. kopano_konnect, ´kopano_kwmserver´) these can be specified directly. Please check the individual README.md files for further instructions.

The compose file itself is part of the git repository and should not be edited directly. Instead a docker-compose.override.yml (will be ignored by git) file can be created to override and extend the default one. See https://docs.docker.com/compose/extends/ for more information.

Why is my compose override file ignored?

This project uses the COMPOSE_FILE environment variable to allow users to override the ports exposed by each container (for example when using a different front facing proxy). When using a docker-compose.override.yml file make sure this is included in this variable in the .env file. For example like this:

COMPOSE_FILE=docker-compose.yml:docker-compose.portmapping.yml:docker-compose.override.yml

I've pulled in the latest version, but now I cannot reach Kopano over the network any longer!

This project switched to specifying COMPOSE_FILE in .env to allow users to easily disable individual ports exposed. Please rerun setup.sh to add this variable to your .env file or add it manually.

How to use a newer version than the one available from the Docker Hub?

In this repository you can also find a Makefile that automates the process of building newer images.

You can easily rebuild all images based on the currently available Kopano version by running make build-all. To just rebuild a certain image you can also run make build-core or make build-webapp. Please check the Makefile to see other possible targets. (depending on your environment you may also be able to autocomplete with the Tab key)

To be able to easily go back to a previous version you can also "tag" you Docker images by running e.g. make tag-core.

Recurring tasks and maintenance tasks within Kopano

There are certain tasks within Kopano that either need to be executed once (like creating the public store when starting a new environment for the first time) or on a regular base (like syncing the internal user list with and external ldap tree). For convinience this project includes a "scheduler" container that will take care of this and that can be dynamically configured through env variables.

Please check the README.md of the scheduler image for further instructions.

Instead of using the internal scheduler one can also just use an existing scheduler (cron on the docker host for example) to execute these tasks.

How to use the project with the official and supported Kopano releases?

This project also makes it possible to build Docker images based on the official Kopano releases. For this the following section needs to be modified in .env:

# Docker Repository to push to/pull from
docker_repo=zokradonh
COMPOSE_PROJECT_NAME=kopano

# Modify below to build a different version, than the kopano nightly release
#KOPANO_CORE_REPOSITORY_URL=https://serial:REPLACE-ME@download.kopano.io/supported/core:/final/Debian_9.0/
#KOPANO_WEBAPP_REPOSITORY_URL=https://serial:REPLACE-ME@download.kopano.io/supported/webapp:/final/Debian_9.0/
#KOPANO_WEBAPP_FILES_REPOSITORY_URL=https://serial:REPLACE-ME@download.kopano.io/supported/files:/final/Debian_9.0/
#KOPANO_WEBAPP_MDM_REPOSITORY_URL=https://serial:REPLACE-ME@download.kopano.io/supported/mdm:/final/Debian_9.0/
#KOPANO_WEBAPP_SMIME_REPOSITORY_URL=https://serial:REPLACE-ME@download.kopano.io/supported/smime:/final/Debian_9.0/
#KOPANO_ZPUSH_REPOSITORY_URL=http://repo.z-hub.io/z-push:/final/Debian_9.0/
#RELEASE_KEY_DOWNLOAD=1
#DOWNLOAD_COMMUNITY_PACKAGES=0

Just uncomment the last four lines and insert your Kopano subscription key where it currently says REPLACE-ME. Once this is done a make build-all will rebuild the images based on the latest available Kopano release (don't forget to make tag-core and make tag-webapp your images after building them).

If you are running a private Docker Registry then you may also change docker_repo to reference your internal registry.

WARNING

The built image includes your subscription key! Do not push this image to any public registry like e.g. https://hub.docker.com!

What if I want to use a different front facing proxy than the one in docker-compose? Or just some part of the compose file?

While using kweb is recommended, this is of course possible.

Please check the individual web containers (kDAV, WebApp and Z-Push for individual instructions).

How can I prevent e.g. kopano-gateway to be reachable from the network?

The exposed ports of each container are defined in docker-compose.ports.yml. If you do not want to expose some of the containers to the network, it is recommended to copy this file to docker-compose.override.ymland just remove all entries that you do not want to have exposed.

I want to use these Docker images outside of an evaluation environment. What do I need to adjust to make this possible?

To get a quick impression of Kopano this git repository bundles a locally build ldap image with some example users. When using the docker-compose.yml in a production environment make sure to:

  • either remove ldap-demo/bootstrap/ldif/demo-users.ldif from the locally built ldap image or completely remove the local ldap from the compose file
  • adapt ldap queries in .env to match you actual ldap server and users
  • all additional configuration of the Kopano components should be specified in the compose file and not within the running container

Can I combine these Docker images with my existing environment?

Yes, that is certainly a possibillity. Within the examples/ directory you can find some ready to run examples that can be run in the following way:

  • docker-compose -f examples/webapp.yml up -d

Some more commands for those unfamilar with docker-compose

  • Start docker-compose-yml file in the background: docker-compose up -d
  • Get a status overview of the running containers: docker-compose ps
  • Stop compose running in the background: docker-compose stop
  • Destroy local containers and network interfaces: docker-compose down
  • Destroy volumes as well (will completely reset the containers, deletes all data): docker-compose down -v
  • Run commands in a running container: docker-compose exec kopano_server kopano-cli --list-users
  • Get logs of a in the background running container: docker-compose logs -f kopano_server
  • Run a kopano-backup: docker run --rm -it -v /var/run/kopano/:/var/run/kopano -v $(pwd):/kopano/path zokradonh/kopano_utils kopano-backup
  • Get a shell in a new container to (for example) run kopano-migration-pst: docker run --rm -it -v /var/run/kopano/:/var/run/kopano -v $(pwd):/kopano/path zokradonh/kopano_utils (to directly run kopano-migration-pst just append it to the command)

Third party docker images

The example docker-compose.yml uses the following components for the MTA (mail delivery, including anti-spam & anti-virus) and openLDAP. Please consult their documentation for further configuration advice.

You can’t perform that action at this time.