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

OpenLiberty with readonly container requires /tmp to be writeable #457

Open
punktilious opened this issue Sep 24, 2023 · 1 comment
Open
Assignees

Comments

@punktilious
Copy link

The current documentation (https://hub.docker.com/_/open-liberty) suggests:

docker run -d -p 80:9080 -p 443:9443 \
    --tmpfs /opt/ol/wlp//output --tmpfs /logs -v /config --read-only \
    open-liberty:webProfile8

However, the server will now fail to start with this error:

/opt/ol/wlp/bin/server: line 196: cannot create temp file for here-document: Read-only file system

Please update the documentation to note that /tmp also needs to be writeable and provide a new example command:

docker run -d -p 80:9080 -p 443:9443 \
    --tmpfs /opt/ol/wlp/output --tmpfs /tmp --tmpfs /logs -v /config --read-only \
    open-liberty:webProfile8

Extra search terms: Kubernetes k8s readOnlyRootFilesystem.

@laveronec
Copy link

laveronec commented Feb 23, 2024

This document states that the WLP_OUTPUT_DIR env variable can be used to set the output directory. It seems that the creation of the here-document outside of the WLP_OUTPUT_DIR is breaking that contract.

This is blocking the ability to run liberty securely in a Kubernetes where setting readOnlyRootFilesystem: true is a best practice.

This issue looks like it has a possible workaround:
#363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants