3.8 KiB
3.8 KiB
home | title | heroImage | footer |
---|---|---|---|
true | Documentation | /images/polardb.png | Apache 2.0 Licensed | Copyright © Alibaba Group, Inc. |
Quick Start with Docker
Pull the instance image of PolarDB for PostgreSQL based on local storage. Create, run and enter the container, and use PolarDB instance directly:
:::: code-group ::: code-group-item Single-Node
# pull the instance image from DockerHub
docker pull polardb/polardb_pg_local_instance:single
# create, run and enter the container
docker run -it --cap-add=SYS_PTRACE --privileged=true --name polardb_pg_single polardb/polardb_pg_local_instance:single bash
# check
psql -h 127.0.0.1 -c 'select version();'
version
--------------------------------
PostgreSQL 11.9 (POLARDB 11.9)
(1 row)
::: ::: code-group-item Multi-Node
# pull the instance image from DockerHub
docker pull polardb/polardb_pg_local_instance:withrep
# create, run and enter the container
docker run -it --cap-add=SYS_PTRACE --privileged=true --name polardb_pg_withrep polardb/polardb_pg_local_instance:withrep bash
# check
psql -h 127.0.0.1 -c 'select version();'
version
--------------------------------
PostgreSQL 11.9 (POLARDB 11.9)
(1 row)
:::
::: code-group-item HTAP
# pull the instance image from DockerHub
docker pull polardb/polardb_pg_local_instance:htap
# create, run and enter the container
docker run -it --cap-add=SYS_PTRACE --privileged=true --name polardb_pg_htap polardb/polardb_pg_local_instance:htap bash
# check
psql -h 127.0.0.1 -c 'select version();'
version
--------------------------------
PostgreSQL 11.9 (POLARDB 11.9)
(1 row)
::: ::::