bflad/chef-docker — pull request #181 by jperville (2014-06-30 14:02:01+00:00)
Title: Fixed remove_link container action.

This PR fixes the new docker_container remove_link action that was introduced in e298547. The feature was broken because the generated docker_cmd did not respect the syntax of `docker rm --link`.

Given the following containers:

```sh
$ docker run --rm -t -i --name myssh -p 22222:22 busybox:ubuntu-14.04 /bin/sh
$ docker run --rm -t -i --link myssh:ssh --name jovial_franklin busybox:ubuntu-14.04 /bin/sh
```

And the following chef resource:

```ruby
docker_container 'jovial_franklin' do
link 'ssh'
action :remove_container
end
```

Before this PR, the generated docker_cmd would generate execute like this:

```sh
$ docker rm --link="ssh" 821a290387c0b44032a09aa9b85d0247d72852c5275e49c83417ebd0a38028de
invalid boolean value "ssh" for --link: strconv.ParseBool: parsing "ssh": invalid syntax

Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers

-f, --force=false Force removal of running container
-l, --link=false Remove the specified link and not the underlying container
-v, --volumes=false Remove the volumes associated to the container
```

After this PR we now have:

```
$ docker rm --link=true jovial_franklin/ssh
```

Which should work as expected.