@@ -15,23 +15,26 @@ mkdir ydb_certs
1515Example of the {{ ydb-short-name }} startup command in Docker with detailed comments:
1616
1717``` bash
18- docker run \
19- -d \ # run container in background and print container ID
20- --rm \ # automatically remove the container
21- --name ydb-local \ # assign a name to the container
22- -h localhost \ # hostname
23- -p 2135:2135 \ # publish a container grpcs port to the host
24- -p 2136:2136 \ # publish a container grpc port to the host
25- -p 8765:8765 \ # publish a container http port to the host
26- -p 5432:5432 \ # publish a container port to the host that provides PostgreSQL compatibility
27- -p 9092:9092 \ # publish a container port to the host that provides Kafka compatibility
28- -v $( pwd) /ydb_certs:/ydb_certs \ # mount directory with TLS certificates
29- -v $( pwd) /ydb_data:/ydb_data \ # mount working directory
30- -e GRPC_TLS_PORT=2135 \ # grpcs port, needs to match what's published above
31- -e GRPC_PORT=2136 \ # grpc port, needs to match what's published above
32- -e MON_PORT=8765 \ # http port, needs to match what's published above
33- -e YDB_KAFKA_PROXY_PORT=9092 \ # port, needs to match what's published above
34- {{ ydb_local_docker_image}}:{{ ydb_local_docker_image_tag }} # docker image name and tag
18+ docker_args=(
19+ -d # run container in background and print container ID
20+ --rm # automatically remove the container
21+ --name ydb-local # assign a name to the container
22+ -h localhost # hostname
23+ -p 2135:2135 # publish a container grpcs port to the host
24+ -p 2136:2136 # publish a container grpc port to the host
25+ -p 8765:8765 # publish a container http port to the host
26+ -p 5432:5432 # publish a container port to the host that provides PostgreSQL compatibility
27+ -p 9092:9092 # publish a container port to the host that provides Kafka compatibility
28+ -v $( pwd) /ydb_certs:/ydb_certs # mount directory with TLS certificates
29+ -v $( pwd) /ydb_data:/ydb_data # mount working directory
30+ -e GRPC_TLS_PORT=2135 # grpcs port, needs to match what's published above
31+ -e GRPC_PORT=2136 # grpc port, needs to match what's published above
32+ -e MON_PORT=8765 # http port, needs to match what's published above
33+ -e YDB_KAFKA_PROXY_PORT=9092 # port, needs to match what's published above
34+ {{ ydb_local_docker_image}}:{{ ydb_local_docker_image_tag }}
35+ )
36+
37+ docker run " ${docker_args[@]} "
3538```
3639
3740{% include [ index.md] ( _includes/rosetta.md ) %}
0 commit comments