Skip to content

Running using readonly file system #47

Open

Description

@omerlh

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?

Activity

  1. gregw commented on Mar 21, 2021

    @gregw

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

  2. omerlh commented on Mar 21, 2021

    @omerlh
    Author

    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
    
  3. lachlan-roberts commented on Mar 23, 2021

    @lachlan-roberts
    Member

    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.

  4. lachlan-roberts commented on Jul 26, 2021

    @lachlan-roberts
    Member

    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.

  5. gregw commented on Jul 26, 2021

    @gregw

    @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.

  6. reopened this on Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions