To build docker images successfully please follow these instructions precisely. There could be a lot of varions on how these images can be built. This is what worked:
As a first step, clone the repository:
```script
git clone git@github.com:questdb/questdb.git
```
## Building from source
### Prerequisites
- Java 11 64-bit
- Maven 3
- Node.js 12 / NPM 6
```script
java --version
mvn --version
node --version
```
### Maven commands
The commands below will create a JAR without assembling executable binaries or
building web console:
```script
cd questdb
mvn clean package -DskipTests
```
To package the web console with the JAR, use the following command:
To build docker images successfully please follow these instructions precisely.
There could be a lot of variations on how these images can be built. This is
what worked:
- Use Windows OS. Docker Desktop might also work on Mac, but not on Linux.
- Download Docker Desktop _Edge_. At the time of writing (Nov 2019) only Edge version is able to build ARM63 images and help create multi-platform manifest.
- Download Docker Desktop _Edge_. At the time of writing (Nov 2019) only Edge
version is able to build ARM64 images and help create multi-platform manifest.
- Ensure "experimental" features are enabled.
To verify that your Docker Desktop is good to go try the following command:
If docker complains on `buildx` command - you either running _stable_ version or have not enabled experimental features. Look through Docker Settings. There is JSON config you need to edit __and__ toggle a switch in UI
If docker complains on `buildx` command - you either running _stable_ version or
have not enabled experimental features. Look through Docker Settings. There is
JSON config you need to edit **and** toggle a switch in UI
Assuming all is good, lets start building.
### Login to Docker Hub
The following command will prompt you for everything thats required and will keep your logged in for some time. You don't have to run it if you know you are logged in.
The following command will prompt you for everything thats required and will
keep your logged in for some time. You don't have to run it if you know you are
logged in.
```
docker login
```
### Switch Docker Desktop to Linux
To do that right click on Docker Desktop tray icon (bottom right) and chose switch from pop-up menu.
To do that right click on Docker Desktop tray icon (bottom right) and chose
switch from pop-up menu.
Create new builder
```
docker buildx create --name multiarchbuilder
docker buildx use multiarchbuilder
docker buildx inspect --bootstrap
```
Create AMD64 image. You can test this image locally and push it only when its ready.
Create AMD64 image. You can test this image locally and push it only when it's
The purpose of the manifest is to simplify image usage by end user. They will just hopefully install `questdb/questdb` and Docker Hub sill figure out appropriate image for target platform.
The purpose of the manifest is to simplify image usage by end user. They will
just hopefully install `questdb/questdb` and Docker Hub sill figure out
The --purge option is there to delete manifest on local Docker. If you do not do it and find out that you added wrong image to manifest, it would be impossible to take that image out!
## Running QuestDB in Docker Container
The --purge option is there to delete manifest on local Docker. If you do not do
it and find out that you added wrong image to manifest, it would be impossible
to take that image out!
Pull image
```
docker pull questdb/questdb:4.0.0
```
## Running QuestDB via Docker
Pull the latest image
To run QuestDB as interactive sandbox:
```
docker run --rm -it -p 9000:9000 -p 8812:8812 questdb/questdb:4.0.0
docker pull questdb/questdb
```
You can Ctrl+C QuestDB. Container and all the data is removed when container stops.
To run QuestDB sensibly, create container without running it: