Skip to content

Commit

Permalink
Dockerfile.test and docker-compose: expose port 8000, set JDWP java opts
Browse files Browse the repository at this point in the history
This allows a remote JVM debugger to be connected to port 8000 on the
dspace docker container (test environment).
This may need a documentation note to warn against running the supplied
docker-compose / Dockerfile.test config in production -- already a good
warning but made more important now that the JVM can be exposed to a
debugger for reading memory...
  • Loading branch information
kshepherd committed May 24, 2022
1 parent 30f923a commit e08fa2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ COPY --from=ant_build /dspace $DSPACE_INSTALL
# NOTE: secretRequired="false" should only be used when AJP is NOT accessible from an external network. But, secretRequired="true" isn't supported by mod_proxy_ajp until Apache 2.5
RUN sed -i '/Service name="Catalina".*/a \\n <Connector protocol="AJP/1.3" port="8009" address="0.0.0.0" redirectPort="8443" URIEncoding="UTF-8" secretRequired="false" />' $TOMCAT_INSTALL/conf/server.xml
# Expose Tomcat port and AJP port
EXPOSE 8080 8009
EXPOSE 8080 8009 8000
# Give java extra memory (2GB)
ENV JAVA_OPTS=-Xmx2000m
ENV JAVA_OPTS=-Xmx2000m\ -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000

# Link the DSpace 'server' webapp into Tomcat's webapps directory.
# This ensures that when we start Tomcat, it runs from /server path (e.g. http://localhost:8080/server/)
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ services:
target: 8080
- published: 8009
target: 8009
- published: 8000
target: 8000
stdin_open: true
tty: true
volumes:
Expand Down

0 comments on commit e08fa2e

Please sign in to comment.