{"id":21721449,"url":"https://github.com/informaticsmatters/docker-tomcat","last_synced_at":"2026-06-08T16:05:53.561Z","repository":{"id":80604983,"uuid":"115736514","full_name":"InformaticsMatters/docker-tomcat","owner":"InformaticsMatters","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-26T12:54:47.000Z","size":12245,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T10:56:19.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InformaticsMatters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-29T16:13:51.000Z","updated_at":"2025-11-26T15:30:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"86c1abf7-99d7-428d-8a21-01090414d40e","html_url":"https://github.com/InformaticsMatters/docker-tomcat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InformaticsMatters/docker-tomcat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Fdocker-tomcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Fdocker-tomcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Fdocker-tomcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Fdocker-tomcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InformaticsMatters","download_url":"https://codeload.github.com/InformaticsMatters/docker-tomcat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Fdocker-tomcat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T02:16:56.857Z","updated_at":"2026-06-08T16:05:53.538Z","avatar_url":"https://github.com/InformaticsMatters.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tomcat Dockerfiles\n\n## Motivation\n\nWhy not use the standard Dockerhub Tomcat image [https://hub.docker.com/_/tomcat/]()?\n\nIt's a perfectly fine image, but has two issues:\n\nFirstly it's fairly big in size - the 8.0-jre8 tag has a size of 558MB, whilst it's based on a debian image that start's \nlife at around 100MB. That's quite a big increase.\n\nSecondly it runs as the root user which is a security risk. Better would be to run as a dedicated non-privileged user, \nbut better still to allow to run as an arbitrarily assigned user ID as is preferred by OpenShift. This image supports \nboth approaches.\n\nSo this series of images try to be as lightweight as possible and allow to run as an arbitrarily assigned user ID (though \na tomcat user with user ID of 501 is defined as the default user). The result for the 8.5-jre8 tag is an image of size \n285MB, approx half that of the DockerHub tomcat image, and not bad as that includes the Java JRE.\n \n## Usage\n\nTypical basic usage:\n```\ndocker run -d -p 8080:8080 -v /path/to/your/application.war:/usr/local/tomcat/webapps/ROOT.war informaticsmatters/tomcat:8.5-jre11 \n```\n\nMore normally though you would create your own Dockerfile that places the contents into the /usr/local/tomcat/webapps directory.\n\n## Notes\n\nThe trick to running as an arbitrarily assigned user ID is that this user belongs to the root group (ID 0) so the permissions \nunder /usr/local/tomcat are set to be readable/writable as appropriate by that group (though still owned by root). \nThis allows the arbitrarily assigned user to access the files as necessary. If you hit permission problems you probably \nneed to do a `chown -R tomcat:0` on the offending files.\n\nJan 2019: The build was switched to use Tomcat 8.5 as 8.0 is no longer supported and downloads are no longer available.\nThe older informaticsmatters/tomcat:8.0-jre8 images are still present on Docker Hub.\n\nNov 2020: The build was switched to Java11 as Java8 is not longer present in the Debian 'Buster' repos.\n\n### Keycloak\n\nThe [Dockerfile-tomcat85-jre11-keycloak]() Dockerfile can be used to create a Tomcat image containing the Keycloak OIDC adapters.\nThese are pushed to Docker Hub using an image name of `informaticsmatters/tomcat-keycloak` and can be used to secure your\napplication against Keycloak (Red Hat SSO). You can use the Dockerfile to build your own image for a different version of\nKeycloak. See comments in the Dockerfile for further details about customisation and use.\n\nTo use this image you will need to at least:\n\n1. provide a suitable `WEB-INF/keycloak.json` file in your war file.\n1. modify `WEB-INF/web.xml` to add suitable `security-constraint`, `login-config` and `security-role` elements.\n1. modify `META-INF/context.xml` to include the Keycloak valve.\n\nFor an example see the [keycloak]() directory.\n\n## Source code and image locations\n\nSource code can be found on GitHub: https://github.com/InformaticsMatters/docker-tomcat\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformaticsmatters%2Fdocker-tomcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finformaticsmatters%2Fdocker-tomcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformaticsmatters%2Fdocker-tomcat/lists"}