An open API service indexing awesome lists of open source software.

https://github.com/saadmairaj/docker-vertica


https://github.com/saadmairaj/docker-vertica

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        



Verica Community Edition Docker Image

Fork of [jbfavre/docker-vertica](https://github.com/jbfavre/docker-vertica)

Docker images collection for Vertica database. Vertica is a column oriented database from Micro Focus. It's available with both a free community licence, and an enterprise one.

## Usage

You can use the image without persistent data store:

docker run -p 5433:5433 saadmairaj/vertica

Or with persistent data store:

docker run -p 5433:5433 -d \
-v /path/to/vertica_data:/home/dbadmin/docker \
saadmairaj/vertica

Or with custom database name (default is "docker") or database password (default is no password):

docker run -p 5433:5433 -e DATABASE_NAME='notdocker' -e DATABASE_PASSWORD='foo123' saadmairaj/vertica

Default user is **dbadmin**

## Run SQL commands with VQSL

1. Run _saadmairtaj/vertica_ docker image

```bash
$ docker run -p 5433:5433 saadmairaj/vertica
```

2. Connect to the vertica container using the _CONTAINER ID_ or _IMAGE_ name. Run the following command to the _CONTAINER ID_ or _IMAGE_ name

```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3cd1d29c34f0 saadmairaj/vertica:10.1.1-RHEL6 "/opt/vertica/bin/do…" 24 hours ago Up 24 hours 0.0.0.0:5433->5433/tcp, :::5433->5433/tcp vigilant_clarke
```

After getting the required _CONTAINER ID_ or _IMAGE_ name, run the following to get into the bash promt.

```bash
$ docker exec -it 3cd1d29c34f0 bash
[root@3cd1d29c34f0 /]#
```

3. In the vertica bash, run `/opt/vertica/bin/vsql` to connect to the actual database

```bash
[root@3cd1d29c34f0 /]# /opt/vertica/bin/vsql -U dbadmin
Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type: \h or \? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit

dbadmin=>
```

Run SQL commands from here, if you want to save the data then run the vertica image with [persistent data store](#usage)

```bash
dbadmin=> \l
List of databases
name | user_name
--------+-----------
docker | dbadmin
(1 row)
```

## How to build from Dockerfile

You have to get relevant Vertica package from my.vertica.com (registration mandatory).
Save it in packages directory.

Then, use following command:

docker build -f Dockerfile.._ \
--build-arg VERTICA_PACKAGE= \
-t saadmairaj/vertica:_- .

Or have a look into `Makefile`.