Sign inSign up

apurba/mule4docker

By apurba

•Updated almost 5 years ago

Running Mule 4 runtime (with sample application) on docker

Image
1

130

apurba/mule4docker repository overview

⁠mule4docker

mule4docker is just an attempt to containerize Mule4 applications.

The image consists of:

  • Alpine linux
  • OpenJDK 8
  • Mule ee standalone runtime 4.4.0 (downloaded from here⁠)
  • A sample Mule4 application
  • A Mule4 domain project
    • To share HTTP_Listener_Config across multiple mule applications (if needed)

Once the container has started, you can change a couple of configurations in your own mule app and copy it to apps directory (within container using volume mapping) to run them. The port remains same as long as the app is using Mule domain configurations for HTTP_Listener_Config.

⁠GitHub

If you would like to build your own container, you can pull the Dockerfile from my github page⁠

⁠How to run this image

docker run -it --name mule4docker --rm -p 8081:8081 apurba/mule4docker:v2

⁠Sample embedded Mule Application

http://<your-server-ip>:8081/hello

⁠Run via docker-compose

You can use the following snipped for your docker-compose config but you will follow additional steps to publish sample apps. They're mentioned after the docker-compose script.

⁠docker-compose script

# MULESOFT MULE4 RUNTIME
  mule4docker:
    image: "apurba/mule4docker:v2"
    container_name: "mule4docker"
    volumes:
      - ${USERDIR}/docker/mule4docker/domains:/opt/mule/domains
      - ${USERDIR}/docker/mule4docker/apps:/opt/mule/apps
    ports:
      - 8081:8081
    restart: always

⁠Once the container is up and running via docker-compose:-
  • You will have to manually copy the sample applications to the mapped volumes domains and apps.
  • Download the domain application and sample application from github page here⁠
  • Copy the domain project docker-mule-common-domain-app.jar first as the sample app hello-mule.jar is dependent on that.

⁠DISCLAIMER

  • This is definitely not the best way to run Mule Applications
  • This container could be a RAM hog.

Tag summary

Content type

Image

Digest

Size

1.2 GB

Last updated

almost 5 years ago

docker pull apurba/mule4docker:v2