Getting Started with Docker Image

The following instructions outline how to build a Docker image if you have the binaries of SnappyData.
SnappyData does not provide a Docker image.

Before building the Docker image, ensure that you have already installed and configured the Docker properly. Refer to Docker documentation for more details.

Verify that Docker is Installed

In the command prompt run the command:

$ docker run hello-world

Build your own Docker image of SnappyData

A sample Dockerfile is provided which you can use to create your own Docker image of SnappyData.

Download the Dockerfile and start script and place them into a single directory. This Dockerfile uses the SnappyData 1.1.1 build.

Move to that directory and run the following commands with appropriate details:

$ docker build -t <your-docker-repo-name>/snappydata:<image-tag> -f Dockerfile .
$ docker push <your-docker-repo-name>/snappydata:<image-tag>

For example:

$ docker build -t snappydatainc/snappydata:1.1.1 -f Dockerfile .
$ docker push snappydatainc/snappydata:1.1.1

Launch SnappyData

In the command prompt, type the following command to launch the SnappyData cluster in single container. This fetches the Docker image from your Docker registry, if the image is not available locally, launches the cluster in a container and leads to the Spark shell.

Note

Ensure that the Docker containers have access to at least 4 GB of RAM on your machine.

$  docker run -it -p 5050:5050 <your-docker-registry>/snappydata bin/spark-shell

The latest Docker image file starts downloading to your local machine. Depending on your network connection, this may take some time.

After you have launched the Spark shell, in the $ scala> prompt, follow the steps explained here.

For more details about how you can work with the Docker image see Snappy Cloud Tools.