Get started with QuestDB via Docker
QuestDB has images for both Linux/macOS and Windows on Docker Hub.
#
Install DockerBefore we start, you will need to install Docker. You can find guides for your platform on the official documentation.
#
QuestDB imageOnce Docker is installed, you will need to pull QuestDB's image from
Docker Hub and create a container. You can do both in one
command using docker run
:
#
OptionsArgument | Description |
---|---|
-p | Port to publish to the host |
-v | To bind mount a volume |
-p
parameter#
This parameter will publish a port to the host, you can specify:
-p 9000:9000
: REST API and Web Console-p 8812:8812
: Postgres-p 9009:9009
: InfluxDB line protocol
#
-v volumesThe QuestDB root_directory will be in the following location:
- Linux
- Windows
#
Container statusYou can check the status of your container with docker ps. It also lists the ports we published:
#
Importing data and sending queriesNow that QuestDB is running, you can start interacting with it:
- If you published the port
9000
, you can follow our REST page - If you published the port
8812
, follow our Postgres page - If you published the port
9009
, follow our InfluxDB page
#
Data persistence#
Restart an existing containerWhen you stop the container, it will not be removed by Docker. This means that you can restart it anytime and your data will be accessible:
docker run
#
Re-run If you re-run the command:
A new container will be created for the QuestDB image. This means that the container will be fresh, any data you may have created previously won't be accessible.