diff --git a/cluster/plan.go b/cluster/plan.go index 85de3293..50538e29 100644 --- a/cluster/plan.go +++ b/cluster/plan.go @@ -691,6 +691,7 @@ func (c *Cluster) BuildSidecarProcess() v3.Process { Labels: map[string]string{ ContainerNameLabel: services.SidekickContainerName, }, + Command: []string{"/bin/bash"}, } } diff --git a/docker/docker.go b/docker/docker.go index dafcced2..4a07080e 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -224,7 +224,7 @@ func UseLocalOrPull(ctx context.Context, dClient *client.Client, hostname string } func RemoveContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) error { - err := dClient.ContainerRemove(ctx, containerName, types.ContainerRemoveOptions{Force: true}) + err := dClient.ContainerRemove(ctx, containerName, types.ContainerRemoveOptions{Force: true, RemoveVolumes: true}) if err != nil { return fmt.Errorf("Can't remove Docker container [%s] for host [%s]: %v", containerName, hostname, err) } diff --git a/pki/deploy.go b/pki/deploy.go index 0b472950..c1f9fcf2 100644 --- a/pki/deploy.go +++ b/pki/deploy.go @@ -109,7 +109,7 @@ func doRunDeployer(ctx context.Context, host *hosts.Host, containerEnv []string, time.Sleep(5 * time.Second) continue } - if err := host.DClient.ContainerRemove(ctx, resp.ID, types.ContainerRemoveOptions{}); err != nil { + if err := host.DClient.ContainerRemove(ctx, resp.ID, types.ContainerRemoveOptions{RemoveVolumes: true}); err != nil { return fmt.Errorf("Failed to delete Certificates deployer container on host [%s]: %v", host.Address, err) } return nil