Search the FirstSpirit Knowledge Base
This article describes the usage of the FirstSpirit Docker image. The image allows for starting FirstSpirit easily in an arbitrary version. It is designed primarily for developers who want to test their modules or develop FirstSpirit projects locally and should not be used in a productive environment. Apart from Docker, there are no requirements to the host system like an installed Java version.
The image setup adheres to the official installation instructions, thus providing a FirstSpirit server installed according to the best practice. It behaves like any other Docker image, for example it only starts FirstSpirit: a Tomcat web-server has to be attached with a second container.
On the host system a configured Docker installation is required that is ready to run containers. This varies depending on the operating system, instructions for Linux, MacOS and Windows are available.
You can test your Docker setup with the Hello World image:
$ docker run hello-world
In the most simple case, start the image in the favoured version:
$ docker run --rm -p8000:8000 docker.artifactory.e-spirit.hosting/e-spirit/firstspirit:5.2.241009
If you receive an error that the image could not be found, you might need to authenticate first:
$ docker login docker.artifactory.e-spirit.hosting
In order to stop the server, press Ctrl+C on the terminal used to start the container.
If no volume has been defined, the image will use an anonymous volume for the FirstSpirit directory. It is possible to define a dedicated volume or a bind mount instead.
Creating a volume is done with the command
$ docker volume create firstspirit
$ docker run --rm -p8000:8000 \
-v firstspirit:/opt/firstspirit5 \
docker.artifactory.e-spirit.hosting/e-spirit/firstspirit:5.2.241009
If the persistence should be performed on the host system, the container may be started with a bind mount instead:
docker run --rm -p8000:8000 \
-v /home/user/data/fs:/opt/firstspirit5 \
docker.artifactory.e-spirit.hosting/e-spirit/firstspirit:5.2.241009
After persisting the configuration (see above) edit the file "conf/fs-wrapper-isolated.conf":
wrapper.java.additional.9=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
docker run --rm -p8000:8000 -p5005:5005 [...]
Installing a module using ServerManager may be a repetitive task slowing down the development cycle. In order to place the module in the FirstSpirit server automatically, there are two different ways:
$ fs-cli.sh module install --fsm dev.fsm
Please note that fs-cli requires a valid license installed for the FirstSpirit server.
Other than modules, FirstSpirit projects can only be installed once the server is up and running. The easiest way is using fs-cli:
$ fs-cli.sh project import --importProjectName Mithras --projectFile mithras-energy.tar.gz
HI @Windmüller,
is there a possibility to change the port number, so we are able to have multiple containers running in parallel? This is a must have requirement for developers.
I encountered some problems when just changing the mapped host port number to e.g. 8001. It seems that then the preview is not working correct because the generated preview URLs are still generated with port number 8000. Can you confirm this?
Also will the docker / compose files be available on Github, so that the community can extend and improve it?
Greetings
Sandro
Hello @bIT_sosswald,
as mentioned in the section "Persisting Configuration and Data" it is possible to configure any setting, including the port number.
The Docker file contains nothing fancy, it just extracts the installer, places the server jar at the right location and configures the entry script. Therefore I am not sure if publishing this would help anyone.
I noticed that you rated the article 4/5. What is missing in your opinion?
Best Regards
Stephan
Subject | Latest Article | |
---|---|---|