Skip to content

Docker

Requirements

Before setting up SlashDB, make sure Docker is installed on the target system.

Instructions

1. First download the SlashDB docker image provided by our team from Docker Hub.

Input the following:

docker pull slashdb/slashdb

2. Check if the image is present in your local repo by (image id may differ):

docker images
REPOSITORY      TAG         IMAGE ID        CREATED             SIZE
slashdb/slashdb latest      edfc56915a4c    About an hour ago   1.237 GB

3. Prepare configuration files:

Download and unzip the default SlashDB configuration files and create folder for SlashDB logs.

wget -c https://downloads.slashdb.com/versions/1.5.0/default-slashdb-configs_1.5.0.zip
unzip ./default-slashdb-configs_1.5.0.zip
mkdir slashdb-log

In your current folder you should have the zip file, folder slashdb and slashdb-log.

$ ls -l
total 16
-rw-rw-r-- 1 mike mike 8136 lis  1 21:39 default-slashdb-configs.zip
drwxrwxr-x 2 mike mike 4096 pa┼║ 29 16:22 slashdb
drwxrwxr-x 2 mike mike 4096 lis  2 19:49 slashdb-log

4. Next, execute the following command to start container with SlashDB.

docker run -d -p 8080:80 \
  -v $(pwd)/slashdb:/etc/slashdb \
  -v $(pwd)slashdb-log:/var/log/slashdb \
  slashdb/slashdb
  • -d for running container in the background
  • -p 8000:80 for mapping local port 8000 to port 80 exposed inside docker
  • -v $(pwd)/slashdb:/etc/slashdb for attaching just downloaded and unpacked folder with SlashDB default configs to /etc/slashdb inside the container. This folder will keep all SlashDB configuration files and they will stay when the container is removed.
  • -v $(pwd)/slashdb-log:/var/log/slashdb for attaching folder slashdb-log to /var/log/slashdb. This folder will keep SlashDB log files and won't be removed when the container is removed.
  • slashdb/slashdb is the name of the image from which the container is derived

5. Check to see if SlashDB is running by:

docker ps
CONTAINER ID    IMAGE           COMMAND                  CREATED              STATUS              PORTS                  NAMES
df3436fb8075    slashdb/slashdb "/bin/sh -c superviso"   About a minute ago   Up About a minute   0.0.0.0:8000->80/tcp  bright_jennings

6. SlashDB should be accessible at http://localhost:8000.

9. To finish setup see: