Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running using readonly file system #47

Open
omerlh opened this issue Mar 21, 2021 · 5 comments
Open

Running using readonly file system #47

omerlh opened this issue Mar 21, 2021 · 5 comments

Comments

@omerlh
Copy link

omerlh commented Mar 21, 2021

I am trying to run the container using readOnlyRootFilesystem set to true, and get the following error:

/docker-entrypoint.sh: 98: /docker-entrypoint.sh: cannot create /var/lib/jetty/jetty.start: Read-only file system

Is there a way to generate jetty.start somehow so I could still use readonly filesystem?

@gregw
Copy link

gregw commented Mar 21, 2021

you should be able to run the script /generate-jetty-start.sh from your Dockerfile

@omerlh
Copy link
Author

omerlh commented Mar 21, 2021

Nice, this indeed helped - but now I am facing new Jetty issue - maybe you can help with that also? I am far from Jetty expert :)

Parent for temp dir not configured correctly

@lachlan-roberts
Copy link
Contributor

You will still need a writeable temp directory for your WebAppContext.

The servlet spec says

A temporary storage directory is required for each servlet context. Servlet containers
must provide a private temporary directory for each servlet context, and make it
available via the javax.servlet.context.tempdir context attribute.

@lachlan-roberts
Copy link
Contributor

This is an issue for the main jetty repository https://github.com/eclipse/jetty.project so feel free to reopen this there, but I think this could break a bunch of servlet features.

@gregw
Copy link

gregw commented Jul 26, 2021

@lachlan-roberts I actually think this would be a good feature to have. The need for a writable temp directory is part of the standard, but we have lots of non-standard modes of deployment.
It may need a change to core jetty to be disable the need for a writable temp dir.

@omerlh In the mean time, you could deploy using a context.xml file that creates a ServletContextHandler instead of a WebAppContext.

@gregw gregw reopened this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants