mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
podman create/run need to load information from the image
We should be pulling information out of the image to set the defaults to use when setting up the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #110 Approved by: mheon
This commit is contained in:

committed by
Atomic Bot

parent
8aeb38e4a7
commit
00d38cb379
@ -307,6 +307,19 @@ func WithSELinuxLabels(processLabel, mountLabel string) CtrCreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithUser sets the user identity field in configutation
|
||||
// Valid uses [user | user:group | uid | uid:gid | user:gid | uid:group ]
|
||||
func WithUser(user string) CtrCreateOption {
|
||||
return func(ctr *Container) error {
|
||||
if ctr.valid {
|
||||
return ErrCtrFinalized
|
||||
}
|
||||
|
||||
ctr.config.User = user
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithRootFSFromImage sets up a fresh root filesystem using the given image
|
||||
// If useImageConfig is specified, image volumes, environment variables, and
|
||||
// other configuration from the image will be added to the config
|
||||
|
Reference in New Issue
Block a user