mirror of
https://github.com/containers/podman.git
synced 2025-09-27 16:54:42 +08:00
Update vendor of buildah to latest code
Fix podman build man pages to match buildah functionality. Also document .dockerignore formatted files. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
18
vendor/github.com/containers/buildah/util.go
generated
vendored
18
vendor/github.com/containers/buildah/util.go
generated
vendored
@ -420,3 +420,21 @@ func ReserveSELinuxLabels(store storage.Store, id string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsContainer identifies if the specified container id is a buildah container
|
||||
// in the specified store.
|
||||
func IsContainer(id string, store storage.Store) (bool, error) {
|
||||
cdir, err := store.ContainerDirectory(id)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
// Assuming that if the stateFile exists, that this is a Buildah
|
||||
// container.
|
||||
if _, err = os.Stat(filepath.Join(cdir, stateFile)); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, errors.Wrapf(err, "error stating %q", filepath.Join(cdir, stateFile))
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user