Skip to content

Instantly share code, notes, and snippets.

@manikmagar
Created November 1, 2017 23:15
Show Gist options
  • Save manikmagar/0fb026c308f60b23a3a4e90beec62854 to your computer and use it in GitHub Desktop.
Save manikmagar/0fb026c308f60b23a3a4e90beec62854 to your computer and use it in GitHub Desktop.
Hello Mule with Docker
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="mule-hello-worldFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/hello" allowedMethods="GET" doc:name="HTTP"/>
<logger message="#['Received Request from Hello World']" level="INFO" doc:name="Logger"/>
<set-payload value="#['Hello World! Welcome to MuleSoft! Today is ' + server.dateTime.format(&quot;dd-MMM-yyyy&quot;) + ' and current time is :' + server.dateTime.format(&quot;HH:mm&quot;)]" mimeType="text/plain" doc:name="Set Payload"/>
</flow>
</mule>
### Dockerfile:
FROM javastreets/mule:ce381
COPY target/mule-hello-world-1.0.0-SNAPSHOT.zip /opt/mule/apps/
CMD [ "/opt/mule/bin/mule"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment