mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Create the /etc/mtab file if does not exists
We should create the /etc/mtab->/proc/mountinfo link so that mount command will work within the container. Docker does this by default. Fixes: https://github.com/containers/podman/issues/10263 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:

committed by
Matthew Heon

parent
f8a793a72d
commit
6d394f0e47
@ -7,7 +7,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var containerMounts = map[string]bool{
|
||||
var initInodes = map[string]bool{
|
||||
"/dev": true,
|
||||
"/etc/hostname": true,
|
||||
"/etc/hosts": true,
|
||||
@ -17,6 +17,7 @@ var containerMounts = map[string]bool{
|
||||
"/run/.containerenv": true,
|
||||
"/run/secrets": true,
|
||||
"/sys": true,
|
||||
"/etc/mtab": true,
|
||||
}
|
||||
|
||||
// GetDiff returns the differences between the two images, layers, or containers
|
||||
@ -36,7 +37,7 @@ func (r *Runtime) GetDiff(from, to string) ([]archive.Change, error) {
|
||||
changes, err := r.store.Changes(fromLayer, toLayer)
|
||||
if err == nil {
|
||||
for _, c := range changes {
|
||||
if containerMounts[c.Path] {
|
||||
if initInodes[c.Path] {
|
||||
continue
|
||||
}
|
||||
rchanges = append(rchanges, c)
|
||||
|
Reference in New Issue
Block a user