rstens / SoapUI-MockService-Docker-image

An extensible docker image for running a Mock-Service with SOAP-UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SoapUI Mock-Service Docker image

This project builds a docker container for running a Mock-Service with SOAP-UI

    $ docker build -t fbascheper/soapui-mockservice-runner .

Running the image

You can run the mock-service container interactively with the following command:

    $ docker run -P -it --rm -e MOCK_SERVICE_NAME=BLZ-SOAP11-MockService  <<image-id>>

    $ docker run -P -it --rm \
        -e MOCK_SERVICE_NAME=BLZ-SOAP11-MockService \
        -e MOCK_SERVICE_PATH=/BLZMockService \
        -e PROJECT=/home/soapui/soapui-prj/default-soapui-project.xml \
         <<image-id>>

And of course you can also run it as a daemon, e.g. using:

    $ docker run --name soapui-daemon -d -e MOCK_SERVICE_NAME=BLZ-SOAP11-MockService  <<image-id>>

Supported environment variables

The following environment variables are supported:

Name Required Default value Description
MOCK_SERVICE_NAME YES Empty Name of the mock service in the SoapUI project file
MOCK_SERVICE_PATH NO Empty Path used to publish the mock service, if empty the path in the SoapUI project file is used
PROJECT NO /home/soapui/soapui-prj/default-soapui-project.xml The complete path to the SoapUI project file

Creating mock services based on this image

The extension-mechanism works in the same fashion as the postgresql docker image, i.e. by adding your own shell script in the docker-entrypoint-initdb directory. But as a rule this should not be necessary.

The best practice for creating a new image is to add your own SoapUI project in the soapui-prj directory and reference this project using the supported environment variables.

About

An extensible docker image for running a Mock-Service with SOAP-UI


Languages

Language:Shell 100.0%