Merge pull request #2535 from ijc/WithUserID-docs
oci: Update docs for `oci.WithUserID`
This commit is contained in:
commit
2c85ae2828
@ -357,8 +357,8 @@ func WithUIDGID(uid, gid uint32) SpecOpts {
|
|||||||
|
|
||||||
// WithUserID sets the correct UID and GID for the container based
|
// WithUserID sets the correct UID and GID for the container based
|
||||||
// on the image's /etc/passwd contents. If /etc/passwd does not exist,
|
// on the image's /etc/passwd contents. If /etc/passwd does not exist,
|
||||||
// or uid is not found in /etc/passwd, it sets gid to be the same with
|
// or uid is not found in /etc/passwd, it sets the requested uid,
|
||||||
// uid, and not returns error.
|
// additionally sets the gid to 0, and does not return an error.
|
||||||
func WithUserID(uid uint32) SpecOpts {
|
func WithUserID(uid uint32) SpecOpts {
|
||||||
return func(ctx context.Context, client Client, c *containers.Container, s *Spec) (err error) {
|
return func(ctx context.Context, client Client, c *containers.Container, s *Spec) (err error) {
|
||||||
setProcess(s)
|
setProcess(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user