updated docker examples
@@ -206,7 +206,26 @@ That image will contain the last built Development snapshot of Apache Hop. rxq77
The most common use case will be that you run a **short-lived container** to just complete one Hop workflow or pipeline.
-Below is an example of the commands to run a **workflow**:
+The first example below runs the sample `switch-case-basic.hpl` **pipeline** from the samples project.
+
+Replace `<tag>` with `latest`, `Development` or a release tag, and replace `<HOP_SAMPLE_PROJECT_PATH>` with the path to the `config/projects/samples` folder in your Hop installation to mount that folder as a volume. This will make the samples project folder available as the `/files` folder in the container.
+
+[source, bash]
+----
+docker run -it --rm \
+ --env HOP_LOG_LEVEL=Basic \
+ --env HOP_FILE_PATH='${PROJECT_HOME}/transforms/switch-case-basic.hpl' \
+ --env HOP_PROJECT_FOLDER=/files \
+ --env HOP_PROJECT_NAME=samples \
+ --env HOP_RUN_CONFIG=local \
+ --name hop-test-container \
+ -v <HOP_SAMPLE_PROJECT_PATH>:/files \
+ apache/hop:<tag>
+----
+
+The second example below runs a **workflow**.
+
+In addition to the most basic example below, this example adds the environment, based on `HOP_ENVIRONMENT_NAME`, `HOP_ENVIRONMENT_CONFIG_FILE_NAME_PATHS` and run parameters with `HOP_RUN_PARAMETERS`
[source,bash]
----
@@ -217,7 +236,7 @@ docker run -it --rm \
--env HOP_PROJECT_NAME=project-a \
--env HOP_ENVIRONMENT_NAME=project-a-test \
--env HOP_ENVIRONMENT_CONFIG_FILE_NAME_PATHS=/files/config/project-a-test.json \
- --env HOP_RUN_CONFIG=classic \
+ --env HOP_RUN_CONFIG=local \
--env HOP_RUN_PARAMETERS=PARAM_LOG_MESSAGE=Hello,PARAM_WAIT_FOR_X_MINUTES=1 \
-v /path/to/local/dir:/files \
--name my-simple-hop-container \
@@ -232,23 +251,24 @@ Run this command to start a Hop Server in a docker container:
[source,bash]
----
-docker pull docker.io/apache/hop:<tag>
docker run -it --rm \
--env HOP_SERVER_USER=admin \
--env HOP_SERVER_PASS=admin \
--env HOP_SERVER_PORT=8181 \
- --env HOP_SERVER_HOSTNAME=localhost \
+ --env HOP_SERVER_HOSTNAME=0.0.0.0 \
-p 8181:8181 \
--name my-hop-server-container \
apache/hop:<tag>
----
+TIP: `localhost` is a loopback to your machine, which may be the container but not the host (your laptop or server where your run the container). Use `0.0.0.0` instead to listen on all available interfaces.
+
Hop Server is designed to receive all variables and metadata from executing clients.
This means it needs little to no configuration to run.
If you want to use the web-services functionality additional information on how to configure your webserver can be found on the user manual xref:manual::hop-server/web-service.adoc[Web Service] page. For this to work properly the `HOP_SERVER_METADATA_FOLDER` variable has to be set too.
-When started can then access the hop-server UI from your host at `http://localhost:8181`
+When started can then access the hop-server UI from your host at `http://0.0.0.0:8181` or `http://localhost:8181`
== Custom Entrypoint Extension Shell Script
