Skip to content

Commit

Permalink
Merge pull request #10 from Senzing/issue-9.dockter.1
Browse files Browse the repository at this point in the history
issue-9 Refactor to template
  • Loading branch information
docktermj authored Nov 20, 2019
2 parents a15a7df + c8d1424 commit d9d7978
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ docker-rmi-for-build-development-cache:
-docker rmi --force $(DOCKER_IMAGE_TAG)

.PHONY: clean
clean: docker-rmi-for-build docker-rmi-for-build-base
clean: docker-rmi-for-build docker-rmi-for-build-development-cache

# -----------------------------------------------------------------------------
# Help
Expand Down
48 changes: 33 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ a mounted volume.
1. [Time](#time)
1. [Background knowledge](#background-knowledge)
1. [Demonstrate using Docker](#demonstrate-using-docker)
1. [Get docker image](#get-docker-image)
1. [Configuration](#configuration)
1. [Volumes](#volumes)
1. [Docker network](#docker-network)
1. [Run docker container](#run-docker-container)
1. [Develop](#develop)
1. [Prerequisite software](#prerequisite-software)
Expand All @@ -30,6 +30,14 @@ a mounted volume.
1. [Errors](#errors)
1. [References](#references)

### Legend

1. :thinking: - 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.
1. :pencil2: - A "pencil" icon means that the instructions may need modification before performing.
1. :warning: - A "warning" icon means that something tricky is happening, so pay attention.

## Expectations

### Space
Expand All @@ -48,15 +56,6 @@ This repository assumes a working knowledge of:

## Demonstrate using Docker

### Get docker image

1. The `senzing/db2-driver-installer` docker image is on [DockerHub](https://hub.docker.com/r/senzing/db2-driver-installer) and can be downloaded.
Example:

```console
sudo docker pull senzing/db2-driver-installer
```

### Configuration

Configuration values specified by environment variable or command line parameter.
Expand All @@ -65,6 +64,9 @@ Configuration values specified by environment variable or command line parameter

### Volumes

:thinking:
The Db2 driver may be placed in any directory.

1. **Example #1:**
To mimic an actual RPM installation,
identify directories for RPM output in this manner:
Expand All @@ -84,26 +86,42 @@ Configuration values specified by environment variable or command line parameter
export SENZING_OPT_IBM_DIR=${SENZING_VOLUME}/opt-ibm
```

### Run docker container
### Docker network

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

1. :pencil2: Determine docker network.
1. List docker networks.
Example:

```console
sudo docker network ls
```

1. :pencil2: Specify docker network.
Choose value from NAME column of `docker network ls`.
Example:

# Choose value from NAME column of docker network ls
export SENZING_NETWORK=nameofthe_network
```console
export SENZING_NETWORK=*nameofthe_network*
```

1. Construct parameter for `docker run`.
Example:

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

### Run docker container

1. Run docker container.
Example:

```console
sudo docker run \
--net ${SENZING_NETWORK} \
--rm \
--volume ${SENZING_OPT_IBM_DIR}:/opt/IBM \
${SENZING_NETWORK_PARAMETER} \
senzing/db2-driver-installer
```

Expand Down

0 comments on commit d9d7978

Please sign in to comment.