Difference between revisions of "MagicDraw in Docker"

From BITPlan Wiki
Jump to navigation Jump to search
Line 7: Line 7:
 
To get the GUI environment working might be tricky e.g. on MacOS see
 
To get the GUI environment working might be tricky e.g. on MacOS see
 
https://stackoverflow.com/questions/37826094/xt-error-cant-open-display-if-using-default-display
 
https://stackoverflow.com/questions/37826094/xt-error-cant-open-display-if-using-default-display
 +
 +
== Dockerfile ==
 +
<source lang='docker'>
 +
FROM java:6
 +
MAINTAINER Wolfgang Fahl (https://www.bitplan.com)
 +
 +
LABEL Description="Java GUI"
 +
 +
COPY src /home/root/java/src
 +
WORKDIR /home/root/java
 +
 +
RUN mkdir bin
 +
RUN javac -d bin src/Gui.java
 +
 +
WORKDIR /home/root/java/
 +
ENTRYPOINT ["java", "-cp","bin","Gui"]
 +
</source>

Revision as of 18:04, 3 April 2019

How to run MagicDraw in Docker container

see also https://community.nomagic.com/running-magicdraw-in-a-docker-container-t5895.html

The goal is to get an older MagicDraw 16.9 working in a container.

Prerequisites

You need to be able to run a Java 6 Swing GUI in a container. To get the GUI environment working might be tricky e.g. on MacOS see https://stackoverflow.com/questions/37826094/xt-error-cant-open-display-if-using-default-display

Dockerfile

FROM java:6
MAINTAINER Wolfgang Fahl (https://www.bitplan.com)

LABEL Description="Java GUI"

COPY src /home/root/java/src
WORKDIR /home/root/java

RUN mkdir bin
RUN javac -d bin src/Gui.java

WORKDIR /home/root/java/
ENTRYPOINT ["java", "-cp","bin","Gui"]