Files
temporalio-docker-compose/tls/run-tls.sh
Albin Antony 7f7d850fa2 Enable docker build kit (#116)
Since a feature `RUN <<EOF` from the docker build kit is being used, it would be a good idea to enable it while running docker build, as the build may not work in some systems.
2022-07-12 12:41:08 -07:00

17 lines
723 B
Bash
Executable File

#!/usr/bin/env bash
set -xe
# Build container image for generating cert material
DOCKER_BUILDKIT=1 docker build -t temporal_tls:test -f ${PWD}/tls/Dockerfile.tls .
mkdir -p .pki
# Run container to name volume and copy out CA certificate
docker run --rm -v temporal_tls_pki:/pki -v ${PWD}/.pki:/pki-out temporal_tls:test
# Build extra layers which copy in CA certificate to local trust store
# Allows for not having to disable host verification on TLS connections
COMPOSE_PROJECT_NAME=tls_test docker-compose -f docker-compose-tls.yml build --no-cache
# Run example docker-compose environment with elasticsearch and postgresql protected with TLS
COMPOSE_PROJECT_NAME=tls_test docker-compose -f docker-compose-tls.yml up