Skip to content

Commit

Permalink
add user option to container config
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Oct 6, 2023
1 parent 7b0c44b commit 876f4dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type Container struct {
WorkingDir string
Entrypoint []string
Cmd []string
User string
StopSignal string
StopTimeout time.Duration
NetworkMode string
Expand Down Expand Up @@ -148,6 +149,7 @@ func (c *Container) dockerConfig() *container.Config {
AttachStderr: true, // Attach the standard error
Env: env, // List of environment variable to set in the container
Cmd: c.Cmd, // Command to run when starting the container
User: c.User, // User that will run the command(s) inside the container, also support user:group
Image: c.Image, // Name of the image as it was passed by the operator (e.g. could be symbolic)
WorkingDir: c.WorkingDir, // Current directory (PWD) in the command will be launched
Entrypoint: c.Entrypoint, // Entrypoint to run when starting the container
Expand Down

0 comments on commit 876f4dc

Please sign in to comment.