Dienstag, 20. August 2019

Docker How To Map Ports To Tomcat Application Server

How to map ports to your Tomcat application server in Docker.
Example uses Tomcat 7.

Adapt to your tomcat directory if using another version.

In Dockerfile:

#start Tomcat and map Port 8080 to Container Port 8080
RUN sed -i 's/port="8080"/port="8080"/' /opt/apache/tomcat/conf/server.xml

URL: http://localhost:8080



Example 8081:

#start Tomcat and map Port 8080 to Container Port 8081
RUN sed -i 's/port="8080"/port="8081"/' /opt/apache/tomcat/conf/server.xml

URL: http://localhost:8081

Keine Kommentare:

Kommentar veröffentlichen

NEW BLOG! http://cleancode.consulting/

Dear Reader, This Blog is closed and remains as an archive. Please find our new Blog at  http://cleancode.consulting/