Giter VIP home page Giter VIP logo

tomcat-owasp's Introduction

Description

Tomcat image following most of the security considerations from owasp.

Run in an oracle server-jre jvm, based on alpine-linux 3.4.

Timezone set to Europe/Zurich in JAVA_OPTS

File encoding set to UTF-8 in CATALINA_OPTS

There is only one webapp (ROOT) which servers a basic index.html page and information pages

  • MemoryInfo.jsp
  • SystemInfo.jsp

Consider to remove this pages in production.

##build

  • build simple
docker build -t tomcat8 .
  • build passing tomcat version as argument
docker build --build-arg TOMCAT_VERSION=8.5.8 -t tomcat8 .
  • build behind a proxy
docker build --build-arg PROXY="http://myproxy:8080" -t tomcat8 .

##run

  • run simple
docker run -it --rm -p 8080:8080 -name tomcat dadez/tomcat8

Tomcat logs are send to sysout excepted accesslog

  • run & map accesslog to your host (without change logs ownership)
mkdir -p logs # create a folder for store files
docker run -it --rm -p 8080:8080 \
--name tomcat \
-v $(pwd -P)/logs:/opt/tomcat/logs \
dadez/tomcat8

The log files created are owned by the uid and gid 1000 you can

  • run passing your own uid and gid as follow
mkdir -p logs # create a folder for store files
docker run -it --rm -p 8080:8080 \
-v $(pwd -P)/logs:/opt/tomcat/logs \
-e UID=$(id -u $USER) \
-e GID=$(id -g $USER) \
--name tomcat \
dadez/tomcat8

tomcat-owasp's People

Contributors

dadez avatar

Watchers

jaihemme avatar

tomcat-owasp's Issues

Do not run tomcat as root

Create a function user (tomcat).
The catalina process should belong to this user.
Ensure that userid and gid can be overridden with Docker run environment arguments (-e)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.