Skip to content

Commit

Permalink
Fixed bug where docker_container resource was not working properly wi…
Browse files Browse the repository at this point in the history
…th swarm
  • Loading branch information
jwthomp authored and josephholsten committed Sep 30, 2015
1 parent 0c3f2a9 commit 4e75ab4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/providers/docker/resource_docker_container_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func resourceDockerContainerCreate(d *schema.ResourceData, meta interface{}) err
func resourceDockerContainerRead(d *schema.ResourceData, meta interface{}) error {
client := meta.(*dc.Client)

apiContainer, err := fetchDockerContainer(d.Get("name").(string), client)
apiContainer, err := fetchDockerContainer(d.Id(), client)
if err != nil {
return err
}
Expand Down Expand Up @@ -223,7 +223,7 @@ func stringSetToStringSlice(stringSet *schema.Set) []string {
return ret
}

func fetchDockerContainer(name string, client *dc.Client) (*dc.APIContainers, error) {
func fetchDockerContainer(ID string , client *dc.Client) (*dc.APIContainers, error) {
apiContainers, err := client.ListContainers(dc.ListContainersOptions{All: true})

if err != nil {
Expand Down

0 comments on commit 4e75ab4

Please sign in to comment.