docker-library / docker-library/tomcat

running as non-root: Unable to create directory for deployment: [/usr/local/tomcat/conf/Catalina/localhost]

Open
#209 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
635
Forks
744
PR merge metrics
No merged PRs in 30d

Description

When running as non-root, I'm getting the following error in the log:

Unable to create directory for deployment: [/usr/local/tomcat/conf/Catalina/localhost]

As this directory is not part of the Tomcat distribution, tomcat tries to create it itself, but if you're running as non-root, Tomcat won't have the privileges to do so.

No Linux guru myself I wonder if this fixable in the dockerfiles provided here, as it seems to entail giving write/execute permissions to all parent folders for the user used to run Tomcat and allowing that user modification access to the /conf folder looks to me to be not so desirable

Also not sure how dynamic those folder names (Catelina and localhost) are

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the repository's Dockerfiles and the non-root runtime setup, then trace creation of /usr/local/tomcat/conf/Catalina/localhost. Confirm which directory permissions cause the logged failure and determine a narrowly scoped way for deployment directory creation to succeed without broadly making /conf writable; done means the image runs as non-root without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
dockerfile
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.