Skip to content

Instantly share code, notes, and snippets.

@sijie
Created May 9, 2019 13:46
Show Gist options
  • Save sijie/04183b395e0732723fcb361f53c15c61 to your computer and use it in GitHub Desktop.
Save sijie/04183b395e0732723fcb361f53c15c61 to your computer and use it in GitHub Desktop.
Run Pulsar standalone in docker with TLS enabled
  1. Create a directory certs.
  2. Generated the TLS keys under certs directory.
  3. Run the docker command.
docker run \
	-p 6650:6650 -p 8080:8080 \
	-p 8081:8081 -p 6651:6651 \
	-p 8443:8443 \
	-v $PWD/certs:/certs \
	-e PULSAR_PREFIX_brokerServicePortTls=6651 \
  -e PULSAR_PREFIX_webServicePortTls=8443 \
	-e PULSAR_PREFIX_tlsEnabled=true \
	-e PULSAR_PREFIX_tlsCertificateFilePath=/certs/broker.cert.pem \
	-e PULSAR_PREFIX_tlsKeyFilePath=/certs/broker.key-pk8.pem \
	-e PULSAR_PREFIX_tlsTrustCertsFilePath=/certs/certs/ca.cert.pem \
	apachepulsar/pulsar:2.3.1 \
	sh -c “bin/apply-config-from-env.py conf/standalone.conf && bin/pulsar standalone”
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment