You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Dockerfile to use fabric8/java-centos-openjdk8-jre image (#151)
When running REMReM Generate in a Docker container there's little point
in using a Tomcat image (tomcat:8.0-jre8) and running the war file as
the sole application in its Tomcat instance. There are also a few
concrete problems in such a setup:
- Because the process inside the container with pid 1 won't respond
to SIGTERM signals, container shutdowns will (by default) take
ten seconds and the processes will be stopped with SIGKILL,
leaving no opportunity to clean anything up.
- Tomcat and the application each have their own logging
configurations, so introducing a common log format or rotation
means extra work.
By switching to fabric8/java-centos-openjdk8-jre we run the war file as
a standalone application with the Tomcat that's built into Spring Boot.
This commit introduces a backwards incompatible change, namely that
the directory where the application looks for application.properties
changes.
While updating the Docker documentation we also drop references to the
--expose flag since it's superfluous given the "EXPOSE 8080" instruction
in the dockerfile.
Copy file name to clipboardExpand all lines: wiki/markdown/docker.md
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -64,20 +64,25 @@ It is possible to set all Spring available properties via docker envrionment "-e
64
64
## Docker flags
65
65
66
66
67
-
<B>"--expose 8080"</B> - this Docker flag tells that containers internal port shall be exposed to outside of the Docker Host. This flag do not set which port that should be allocated outside Docker Host on the actual server/machine.
68
-
69
-
70
67
<B>"-p 8081:8080"</B> - this Docker flag is mapping the containers external port 8081 to the internal exposed port 8080. Port 8081 will be allocated outside Docker host and user will be able to access the containers service via port 8081.
71
68
72
69
73
70
When RemRem-Generate container is running on your local Docker host, RemRem-Generate should be reachable with address "localhost:8081/\<Rest End-Point\>" or "\<docker host ip\>:8081/\<Rest End-Point\>"
74
71
75
72
76
73
Another option to configure RemRem-Generate is to provide the application properties file into the container, which can be made in two ways:
77
-
1. Put application.properties file in Tomcat Catalina config folder in container and run RemRem-Generate:
74
+
1. Put application.properties file in the container's /deployments folder and run RemRem-Generate:
78
75
79
-
`docker run -p 8081:8080 --expose 8080 --volume /path/to/application.properties:/usr/local/tomcat/config/application.properties remrem-generate`
76
+
`docker run -p 8081:8080 --volume /path/to/application.properties:/deployments/application.properties remrem-generate`
80
77
81
78
2. Put application.properties file in a different folder in container and tell RemRem-Generate where the application.properties is located in the container:
0 commit comments