mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
Handle podman-remote --arch, --platform, --os
Podman remote should be able to handle remote specification of arches. Requires: https://github.com/containers/buildah/pull/3116 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Ed Santiago
parent
68269a0ee1
commit
b68106703e
15
vendor/github.com/containers/buildah/run_linux.go
generated
vendored
15
vendor/github.com/containers/buildah/run_linux.go
generated
vendored
@@ -359,7 +359,17 @@ func runSetupBuiltinVolumes(mountLabel, mountPoint, containerDir string, builtin
|
||||
}
|
||||
initializeVolume = true
|
||||
}
|
||||
stat, err := os.Stat(srcPath)
|
||||
// Check if srcPath is a symlink
|
||||
stat, err := os.Lstat(srcPath)
|
||||
// If srcPath is a symlink, follow the link and ensure the destination exists
|
||||
if err == nil && stat != nil && (stat.Mode()&os.ModeSymlink != 0) {
|
||||
srcPath, err = copier.Eval(mountPoint, volume, copier.EvalOptions{})
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "evaluating symlink %q", srcPath)
|
||||
}
|
||||
// Stat the destination of the evaluated symlink
|
||||
stat, err = os.Stat(srcPath)
|
||||
}
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return nil, err
|
||||
@@ -519,8 +529,9 @@ func (b *Builder) setupMounts(mountPoint string, spec *specs.Spec, bundlePath st
|
||||
return err
|
||||
}
|
||||
|
||||
allMounts := util.SortMounts(append(append(append(append(append(volumes, builtins...), secretMounts...), bindFileMounts...), specMounts...), sysfsMount...))
|
||||
// Add them all, in the preferred order, except where they conflict with something that was previously added.
|
||||
for _, mount := range append(append(append(append(append(volumes, builtins...), secretMounts...), bindFileMounts...), specMounts...), sysfsMount...) {
|
||||
for _, mount := range allMounts {
|
||||
if haveMount(mount.Destination) {
|
||||
// Already mounting something there, no need to bother with this one.
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user