Created
April 7, 2020 14:05
-
-
Save pjmartorell/9b2256d616d8cd0dab5067e20ae389fe to your computer and use it in GitHub Desktop.
How to deploy SoapUI mock server on Heroku with Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dockerfile for building a soapui-runner | |
FROM openjdk:8 | |
ENV SOAPUI_VERSION="5.5.0" \ | |
SOAPUI="/opt/soapui" \ | |
PROJECT_FILE="/root/your-project.xml" \ | |
MOCKSERVICE_NAME="MockServiceName" \ | |
MOCK_BIN="mockservicerunner.sh" | |
RUN wget https://s3.amazonaws.com/downloads.eviware/soapuios/$SOAPUI_VERSION/SoapUI-$SOAPUI_VERSION-linux-bin.tar.gz && \ | |
tar -xzf SoapUI-5.5.0-linux-bin.tar.gz -C /opt/ && \ | |
mv /opt/SoapUI-5.5.0 /opt/soapui && \ | |
rm -f SoapUI-5.5.0-linux-bin.tar.gz | |
ENV PATH="$PATH:$SOAPUI/bin" | |
COPY your-project.xml /root/ | |
COPY entrypoint.sh / | |
ENTRYPOINT ["/entrypoint.sh"] | |
CMD ["start"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "start" ]; then | |
$MOCK_BIN -Djava.awt.headless=true -Dfile.encoding=UTF8 -m "$MOCKSERVICE_NAME" -p "$PORT" $PROJECT_FILE | |
else | |
exec $@ | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: | |
docker: | |
web: Dockerfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment