+49 228 5552576-0


Tutorial: Deployment within Docker Container

This Tutorial demonstrates how to build a Docker Image from Membrane Service Proxy.

You create a Docker Image once with Membrane its config and all artifacts like schemas and stylesheets and you can deploy as many containers as you want.

1. Set up a Docker-Engine, if you haven't already

Have a look at Install Docker Engine.

2. Create a Membrane Docker Image

Open a terminal and head to the Membrane installation directory. Change into examples/docker and have a look at the Membrane Dockerfile.

        FROM ubuntu:14.04

        RUN apt-get install -y software-properties-common && \
        	apt-get install unzip && \
        	add-apt-repository -y ppa:webupd8team/java && \
        	apt-get update
        RUN	echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
        	apt-get install -y oracle-java8-installer
        RUN	rm -rf /var/lib/apt/lists/* && \
        	rm -rf /var/cache/oracle-jdk8-installer

        ENV	JAVA_HOME /usr/lib/jvm/java-8-oracle

        ENV	MEMBRANE_DOWNLOAD_URL "http://repository.membrane-soa.org/service/local/artifact/maven/content?r=releases&g=org.membrane-soa&a=membrane-service-proxy&v=LATEST&e=zip"

        RUN	wget -L -P /opt ${MEMBRANE_DOWNLOAD_URL} --content-disposition && \
        	cd /opt && \
        	unzip *.zip && \
        	rm *.zip && \
        	ln -s membrane-service-proxy-* membrane

        COPY *.xml /opt/membrane/conf/
        COPY *.wsdl /opt/membrane/conf/
        COPY *.json /opt/membrane/conf/
        COPY *.xsd /opt/membrane/conf/

        EXPOSE 8000-9900

        ENTRYPOINT ["/opt/membrane/service-proxy.sh"]

It is based on Ubuntu and installs the Oracle Java JDK.
The latest Membrane Version is downloaded and an example proxies.xml is copied in the container.

Now create the docker image:

root> docker build -t membrane .

And run it:

root> docker run -d -p 8080:8080 membrane

Now let's:

root> curl http://DOCKER_HOST:8080

You should see the content of http://www.thomas-bayer.com.

3. Modify Membrane Docker Image

Make your changes to the example proxies.xml or replace it with your own.
Then you can build and redeploy Membrane again.

root> docker build -t membrane .
root> docker run -d -p 8080:8080 membrane
root> curl http://DOCKER_HOST:8080

Copyright © 2008-2015 predic8 GmbH
Moltkestr. 40, 53173 Bonn, Tel. +49 (228) 555 25 76-0