Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support docker -e option #123

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,24 @@ Examples:
- kvs:kvs
```

### environments

Set ```environment variable(s)``` of other container(s) that connect from the suite container.

Examples:

```
environments: deep=purple
```

Examples:

```
environments:
- deep=purple
- hoge=fuga
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you need to close your code block.

### publish\_all

Publish all exposed ports to the host interfaces.
Expand Down
1 change: 1 addition & 0 deletions lib/kitchen/driver/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def build_run_command(image_id)
Array(config[:cap_add]).each {|cap| cmd << " --cap-add=#{cap}"} if config[:cap_add]
Array(config[:cap_drop]).each {|cap| cmd << " --cap-drop=#{cap}"} if config[:cap_drop]
Array(config[:security_opt]).each {|opt| cmd << " --security-opt=#{opt}"} if config[:security_opt]
Array(config[:environments]).each {|env| cmd << " -e #{env}"}
cmd << " #{image_id} #{config[:run_command]}"
cmd
end
Expand Down