question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Launch container image with read-only filesystem

See original GitHub issue

Q&A (please complete the following information)

  • OS: Fedora 30, Centos 7, probably most others
  • Browser: Any
  • Version: Any
  • Method of installation: docker image pull
  • Swagger-UI version: 3.24.2
  • Swagger/OpenAPI version: N/A

Content & configuration

Example Swagger/OpenAPI definition: N/A Swagger-UI configuration options: default

Describe the bug you’re encountering

Cannot launch container image when filesystem is read-only. This problem was initially detected in a Kubernetes cluster where the default PodSecurityPolicy has readOnlyRootFilesystem set as true. Can be reproduced directly with docker.

To reproduce…

docker run --publish 8080:8080 --rm --read-only docker.io/swaggerapi/swagger-ui:v3.24.2

Expected behavior

Able to launch with a readonly filesystem.

Additional context or thoughts

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
char0ncommented, Sep 24, 2021

Hi @robdesbois,

I understand your requirement of having a an image running on read-only filesystem. Let’s try to understand how the changes in your PR change the behavior of the image.

0reactions
bluebrowncommented, Nov 28, 2022

I am also interested in rooing this with readonly rootfs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Read-only filesystems in Docker and Kubernetes
Let's start a new container from the official ubuntu image with an interactive TTY, to verify that the filesystem is read-only.
Read more >
Container root file sytem is set to read-only - Datadog Docs
The container's root filesystem should be treated as a 'golden image' by using Docker run's --read-only option. This prevents any writes to the...
Read more >
Use Read-Only filesystem for containers where possible
A read-only root filesystem helps to enforce an immutable infrastructure strategy. The container should only write on mounted volumes that can persist, even...
Read more >
Docker Tip #55: Creating Read Only Containers - Nick Janetakis
Dealing with situational writes in a read-only container:​​ If you come across an image that doesn't work with --read-only automatically you may ...
Read more >
ubuntu - Docker - mkdir read-only file system - Stack Overflow
How are you running the container? · read-only file system might indicate hdd failure. · The process is running as a normal user,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found