diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-24 09:27:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 09:27:24 -0500 |
commit | dec06b1c3fbfad3fc75702f73ea59891a64989ad (patch) | |
tree | a53b37d895c761c56f12794166a2e295796300dc /libpod/container_inspect.go | |
parent | 4846f877b83ea55b1d70155fd668c79a4a0f88f4 (diff) | |
parent | fc32ec768df8a59a9c438f38cf2fd2c08a77f94b (diff) | |
download | podman-dec06b1c3fbfad3fc75702f73ea59891a64989ad.tar.gz podman-dec06b1c3fbfad3fc75702f73ea59891a64989ad.tar.bz2 podman-dec06b1c3fbfad3fc75702f73ea59891a64989ad.zip |
Merge pull request #9494 from mheon/sort_caps
Sort CapDrop in inspect to guarantee order
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r-- | libpod/container_inspect.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index 399eff845..e0569e2d4 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -2,6 +2,7 @@ package libpod import ( "fmt" + "sort" "strings" "github.com/containers/common/pkg/config" @@ -698,6 +699,8 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named for cap := range boundingCaps { capDrop = append(capDrop, cap) } + // Sort CapDrop so it displays in consistent order (GH #9490) + sort.Strings(capDrop) } hostConfig.CapAdd = capAdd hostConfig.CapDrop = capDrop |