Anypoint Studio in an Ubuntu image. Requires XQuartz. Docker image only on Mac OSX.
521
Build and run Anypoint Studio in an Ubuntu image. Expose the correct ports, volumes (for libs and plugins), and workspace for persistence. Currently, this Docker image is specific to Mac OSX.
*** Warning:There might be an error running studio such as "AnypointStudio: Cannot open display", try to use each one of the below commands and attempt to run studio again.Assign IP address or hostname to xquartz ***
a. Method 1: DISPLAY_MAC=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
b. Method 2: DISPLAY_MAC=ifconfig en0 | grep "inet " | cut -d " " -f2:0
c. Method 3: DISPLAY_MAC=hostname
Start xhost: a. Method 1: xhost If you have problems with multiple IPs. Try b. Method 2: xhost + $DISPLAY_MAC
A response should return something similar the message below:
192.168.86.23 being added to access control list
Below, the reference to should be replaced with your docker store/hub user name. For example, mine is granthbr.
Build the image:
docker build -t <docker-hub-username>/studio .
Can be ran with internally hosted workspace, maven, and libs:
docker run -d -it -e DISPLAY=$DISPLAY_MAC --name anypoint-studio <docker-hub-username>/studio
Or with external mounted volumes (recommended for persistent workspace, maven repo, and libraries. To externally host the libs, first run without volumes (see above), then onces the container is running, copy the features and plugins out to the external environment like so:
docker cp anypoint-studio:/opt/AnypointStudio/features . and docker cp anypoint-studio:/opt/AnypointStudio/plugins .
Next, use a command similar to the command below: (include the --rm command if you don't want the image to persist after you build it)
docker run -it --rm -e DISPLAY=$DISPLAY_MAC --name studio -v `pwd`/features:/opt/AnypointStudio/features -v `pwd`/plugins:/opt/AnypointStudio/plugins -v `pwd`/workspace:/home/mule/workspace -v ~/.m2:/home/mule/.m2 <docker-hub-username>/studio
Running with ports open:
docker run -it --rm -e DISPLAY=$DISPLAY_MAC --name studio -p 8181:8181 -p 6666:6666 -v `pwd`/features:/opt/AnypointStudio/features -v `pwd`/plugins:/opt/AnypointStudio/plugins -v `pwd`/workspace:/home/mule/workspace -v ~/.m2:/home/mule/.m2 <docker-hub-username>/studio
There are certain restrictions to running the IDE in a Docker container. There should be handlers and adjustments that assist with manaeuvering around the obstacles.
Content type
Image
Digest
Size
1.2 GB
Last updated
over 9 years ago
docker pull granthbr/docker-anypoint-studio