Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.41 KB

File metadata and controls

49 lines (35 loc) · 1.41 KB

Running in Docker Locally

Prerequisites

To build and run the sample, you must have the done the following:

Run the Application

  1. Build the container image from the Dockerfile:

    docker build -t liberty-sample .
  2. Export the Event Streams for IBM Cloud instance credentials:

    From the Event Streams for IBM Cloud instance dashboard, click Service Credentials and select or create a new one. Copy its content and export it as below:

    export VCAP_SERVICES='{
        "instance_id": "...",
        "api_key": "...",
        "kafka_admin_url": "....",
        "kafka_rest_url": "...",
        "kafka_brokers_sasl": [
          ...
        ],
        "user": "...",
        "password": "..."
    }'
  3. Run the container image

    docker run -e VCAP_SERVICES="$VCAP_SERVICES" -p 9080:9080 liberty-sample
  4. Access the application:

    Point your browser to http://localhost:9080

Further references

If you want find out more about Docker then check the following document:

Docker documentation