/docker-senzing-base

Dockerfile used in FROM statements.

Primary LanguageDockerfileApache License 2.0Apache-2.0

docker-senzing-base

If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.

You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!

Overview

The senzing/senzing-base docker image is a Senzing-ready, python image supporting python 2.7 and 3.7. The image can be used in a Dockerfile FROM senzing/senzing-base statement to simplify building apps with Senzing. As a docker container it runs as non-root and is immutable.

For examples on how to use the senzing/senzing-base docker image, see github.com/senzing/docker-python-demo or github.com/senzing/docker-senzing-debug.

Related artifacts

  1. DockerHub
  2. Helm Chart

Contents

  1. Expectations
  2. Demonstrate using Docker
    1. Configuration
    2. External database
    3. Database support
    4. Run docker container
  3. References

Legend

  1. 🤔 - A "thinker" icon means that a little extra thinking may be required. Perhaps there are some choices to be made. Perhaps it's an optional step.
  2. ✏️ - A "pencil" icon means that the instructions may need modification before performing.
  3. ⚠️ - A "warning" icon means that something tricky is happening, so pay attention.

Expectations

  • Space: This repository and demonstration require 6 GB free disk space.
  • Time: Budget 40 minutes to get the demonstration up-and-running, depending on CPU and network speeds.
  • Background knowledge: This repository assumes a working knowledge of:

Demonstrate using Docker

Configuration

Configuration values specified by environment variable or command line parameter.

External database

🤔 Optional: Use if storing data in an external database. If not specified, the internal SQLite database will be used.

  1. ✏️ Specify database. Example:

    export DATABASE_PROTOCOL=postgresql
    export DATABASE_USERNAME=postgres
    export DATABASE_PASSWORD=postgres
    export DATABASE_HOST=senzing-postgresql
    export DATABASE_PORT=5432
    export DATABASE_DATABASE=G2
  2. Construct Database URL. Example:

    export SENZING_DATABASE_URL="${DATABASE_PROTOCOL}://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE}"
  3. Construct parameter for docker run. Example:

    export SENZING_DATABASE_URL_PARAMETER="--env SENZING_DATABASE_URL=${SENZING_DATABASE_URL}"

Database support

🤔 Optional: Some database need additional support. For other databases, these steps may be skipped.

  1. Db2: See Support Db2 instructions to set SENZING_OPT_IBM_DIR_PARAMETER.
  2. MS SQL: See Support MS SQL instructions to set SENZING_OPT_MICROSOFT_DIR_PARAMETER.

Run docker container

  1. Run docker container. Example:

    sudo docker run \
      --interactive \
      --rm \
      --tty \
      ${SENZING_DATABASE_URL_PARAMETER} \
      ${SENZING_OPT_IBM_DIR_PARAMETER} \
      ${SENZING_OPT_MICROSOFT_DIR_PARAMETER} \
      senzing/senzing-base

References