- Create a directory
certs
.
- Generated the TLS keys under
certs
directory.
- 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”