/docker-adminer

Dockerfile wrapping `adminer`, a database viewer.

Primary LanguageMakefileApache License 2.0Apache-2.0

docker-adminer

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

A docker wrapper over Adminer.

The docker image is based on hub.docker.com/_/adminer and has added support for MSSQL.

Related artifacts

  1. DockerHub
  2. Helm Chart

Contents

  1. Expectations
    1. Space
    2. Time
    3. Background knowledge
  2. Demonstrate using Docker
    1. Configuration
    2. Default database
    3. Docker network
    4. Run docker container
  3. Develop
    1. Prerequisite software
    2. Clone repository
    3. Build docker image for development
  4. Examples
  5. Errors
  6. References

Legend

  1. 🤔 - A "thinker" icon means that a little extra thinking may be required. Perhaps you'll need to make some choices. 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:

  1. Docker

Demonstrate using Docker

Configuration

Configuration values specified by environment variable or command line parameter.

Default database

🤔 Optional: Use to specify a particular database hostname.

  1. ✏️ Specify docker network. Example:

    export ADMINER_DEFAULT_SERVER=*hostname-or-ip-address*
  2. Construct parameter for docker run. Example:

    export ADMINER_DEFAULT_SERVER_PARAMETER="--env ADMINER_DEFAULT_SERVER=${ADMINER_DEFAULT_SERVER}"

Docker network

🤔 Optional: Use if docker container is part of a docker network.

  1. List docker networks. Example:

    sudo docker network ls
  2. ✏️ Specify docker network. Choose value from NAME column of docker network ls. Example:

    export SENZING_NETWORK=*nameofthe_network*
  3. Construct parameter for docker run. Example:

    export SENZING_NETWORK_PARAMETER="--net ${SENZING_NETWORK}"

Run docker container

  1. Run docker container. Example:

    sudo docker run \
      --interactive \
      --rm \
      --tty \
      ${ADMINER_DEFAULT_SERVER_PARAMETER} \
      ${SENZING_NETWORK_PARAMETER} \
      senzing/adminer

Develop

Prerequisite software

The following software programs need to be installed:

  1. git
  2. make
  3. docker

Clone repository

For more information on environment variables, see Environment Variables.

  1. Set these environment variable values:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=docker-adminer
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
  2. Follow steps in clone-repository to install the Git repository.

Build docker image for development

  1. Option #1: Using docker command and GitHub.

    sudo docker build --tag senzing/adminer https://github.com/senzing-garage/docker-adminer.git#main
  2. Option #2: Using docker command and local repository.

    cd ${GIT_REPOSITORY_DIR}
    sudo docker build --tag senzing/adminer .
  3. Option #3: Using make command.

    cd ${GIT_REPOSITORY_DIR}
    sudo make docker-build

    Note: sudo make docker-build-development-cache can be used to create cached docker layers.

Examples

Errors

  1. See docs/errors.md.

References

  1. Adminer
    1. GitHub