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

Make it more easy to modify /etc/hosts from within container by having it read-write (rw) #25126

Open
aanno opened this issue Jan 26, 2025 · 1 comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. network Networking related issue or feature

Comments

@aanno
Copy link

aanno commented Jan 26, 2025

Feature request description

The file /etc/hosts is managed by podman. This is all right, but I would like to see a way (option?) to modify it from within the (running) container to circumvent problems with nextcloud all-in-one (AIO) described here.

Running AIO, /etc/hosts is mounted rw on some containers (good for the problem at hand), but ro (read-only) on others:

# This is the output of `mount | grep hosts` on some AIO containers
nextcloud-aio-mastercontainer
tmpfs on /etc/hosts type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-collabora
tmpfs on /etc/hosts type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-talk
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-database
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-redis
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-fulltextsearch
tmpfs on /etc/hosts type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-imaginary
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-nextcloud
tmpfs on /etc/hosts type tmpfs (rw,seclabel,nosuid,nodev,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-notify-push
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-whiteboard
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
nextcloud-aio-apache
tmpfs on /etc/hosts type tmpfs (ro,seclabel,nosuid,nodev,noexec,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)
caddy
tmpfs on /etc/hosts type tmpfs (rw,seclabel,nosuid,nodev,relatime,size=1632472k,nr_inodes=408118,mode=700,uid=1003,gid=1003,inode64)

Suggest potential solution

I would appreciate an (global) container configuration option to have /etc/hosts rw in every container started/running.

Have you considered any alternatives?

No response

Additional context

IMHO, this would be a solution to #25125

@aanno aanno added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 26, 2025
@Luap99
Copy link
Member

Luap99 commented Jan 27, 2025

How are the containers created? I am not aware of us bind mounting /etc/hosts read only.

@Luap99 Luap99 added the network Networking related issue or feature label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. network Networking related issue or feature
Projects
None yet
Development

No branches or pull requests

2 participants