Bulding Docker Containers
These procedures are intended for users with Docker knowledge. We do not provide Docker support, just provide guidelines on how to use it with our product. For more information about Docker, see https://docs.docker.com/
Warning: Docker on Windows (including Docker Desktop and WSL) is intended for development purposes only. Due to architectural limitations, it should not be used for production deployments. For more information, please refer to the official Microsoft WSL documentation (Who is WSL for?).
This section describes how to build and run the Teamwork Cloud stack using Docker Compose.
Best practices
- Always build images after changing Dockerfiles.
- Monitor the memory usage closely.
- Enable persistent volumes in production.
- Secure certificates and credentials.
- Use external backups for Cassandra.
Prerequisites
For Teamwork Cloud requirements, see the official documentation here: TWC Requirements
To install Docker, follow the official steps from Docker’s documentation
Directory structure
To create a directory structure
- Use the following command to create a folder structure in your installation path:
mkdir -p twc/{cassandra,data/{cassandra,certs,elasticsearch,twcloud,webapp},messaging,twcloud/{docker.scripts,twcloud},webapp/{docker.scripts,WebAppPlatform},zookeeper_elasticsearch}SHELL - Verify using the following command:
tree -d -L 2 twcSHELL

Each service is built locally using its own Dockerfile.
Building containers
To create containers network
- Create and verify a network for containers using the following command:
docker network create twc-net docker network ls -f name=twc-netSHELL
Generate Certs
Example script to generate certificates for the application.
- Change directory to twc.
cd twc/SHELL - Create the script file generateCerts.sh and run it to generate certs
#!/usr/bin/env bash generate() { local fqdn=$1 echo Generate keypair with -dname cn=$fqdn -ext SAN=dns:$fqdn keytool -genkeypair -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 3650 -keystore "${fqdn}.p12" \ -storetype pkcs12 -storepass nomagic -keypass nomagic -alias $fqdn -dname cn=$fqdn \ -ext BasicConstraints:critical=ca:false -ext SAN=dns:$fqdn,dns:localhost,dns:host.docker.internal keytool -export -keystore "${fqdn}.p12" -storepass nomagic -alias ${fqdn} -file "${fqdn}.crt" } pushd data/certs && \ generate twcloud && \ generate webapp && \ popd || exitSHELL - Validate the generated certificates in
data/certs:ls -l data/certs keytool -list -keystore data/certs/twcloud.p12 -storepass nomagic keytool -list -keystore data/certs/webapp.p12 -storepass nomagicSHELL
Stopping services
To stop the services
- Go to each service directory and run the following command:
docker compose downSHELL
Removing volumes
Please note that this action may cause data loss!
To remove volumes
- Run the following command:
docker-compose down -vSHELL
Also see the pages for individual products: