Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ The following list of options are currently supported:
containerRunOptions:
user: "root" # set the --user/-u flag
privileged: true # set the --privileged flag (default: false)
network: "bridge" # set the --net flag (default: bridge)
allocateTty: true # set the --tty flag (default: false)
envFile: path/to/.env # load environment variables from file and pass to container (equivalent to --env-file)
envVars: # if not empty, read each envVar from the environment and pass to test (equivalent to --env/e)
Expand Down
2 changes: 2 additions & 0 deletions pkg/drivers/docker_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (d *DockerDriver) hostConfig() *docker.HostConfig {
Capabilities: d.runOpts.Capabilities,
Binds: d.runOpts.BindMounts,
Privileged: d.runOpts.Privileged,
NetworkMode: d.runOpts.Network,
Comment thread
jmwachtel marked this conversation as resolved.
Outdated
Runtime: d.runtime,
}
}
Expand All @@ -77,6 +78,7 @@ func (d *DockerDriver) hostConfig() *docker.HostConfig {
Capabilities: d.runOpts.Capabilities,
Binds: d.runOpts.BindMounts,
Privileged: d.runOpts.Privileged,
NetworkMode: d.runOpts.Network,
}
}
if d.runtime != "" {
Expand Down
4 changes: 3 additions & 1 deletion pkg/types/unversioned/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type ContainerRunOptions struct {
EnvFile string `yaml:"envFile"`
Capabilities []string
BindMounts []string `yaml:"bindMounts"`
Network string `yaml:"network"`
}

func (opts *ContainerRunOptions) IsSet() bool {
Expand All @@ -61,7 +62,8 @@ func (opts *ContainerRunOptions) IsSet() bool {
len(opts.EnvFile) > 0 ||
(opts.EnvVars != nil && len(opts.EnvVars) > 0) ||
(opts.Capabilities != nil && len(opts.Capabilities) > 0) ||
(opts.BindMounts != nil && len(opts.BindMounts) > 0)
(opts.BindMounts != nil && len(opts.BindMounts) > 0) ||
len(opts.Network) != 0
}

type TestResult struct {
Expand Down