Skip to content

Latest commit

 

History

History
77 lines (63 loc) · 3.14 KB

docker.md

File metadata and controls

77 lines (63 loc) · 3.14 KB

Installation (using Docker)

Is this the right installation type for you?

The Docker-based execution is slower to execute, but has almost no requirements. Docker execution takes about 3-4 times longer than the native installation. If you just want to try this project, but haven't decided if you will use it for an extended period of time, you will most likely want this Docker-based installation. If you later decide to use this project for a longer period of time, you can still do the native installation.

Prerequisites

  • Docker (for running the compilers that build this project)

Installation

You can build the project using this folder:

Linux/macOS:

docker run --rm -v $PWD:$PWD -v /Users/kirchhof/.m2:/root/.m2 -w $PWD maven:3-jdk-11 mvn clean install
                                ^--------------^
                       replace this with your own home folder

Windows:

docker run --rm -v %CD%:/root/montithings -v C:\Users\Kirchhof\.m2:/root/.m2 -w /root/montithings maven:3-jdk-11 mvn clean install
                                             ^----------------^
                                      replace this with your own home folder

Now all the application folders should contain folders called target/generated-sources that contain the generated C++ code an some scripts. Within the target/generated-sources folder you can try out the generated code by using this command:

Linux/macOS:

docker run -it --rm -v $PWD:$PWD -w $PWD montithings/mtcmake

Windows:

docker run -it --rm -v %CD%:/root/generated-sources -w /root/generated-sources montithings/mtcmake

This command will bring you into a new shell where you can build the project. There you can build the project (for example called hierarchy) using

./build.sh hierarchy

After building the code, you try to run it by going into the folder with the binaries (cd build/bin) and then starting the application (./hierarchy in this example case).

Leave the Docker container by pressing Ctrl+D or by typing exit.