# Error: Error initializing Docker client: protocol not available

**URL:** <https://discuss.hashicorp.com/t/error-error-initializing-docker-client-protocol-not-available/10886>\
**Category:** Terraform\
**Created:** [July 1, 2020, 7:40pm UTC](https://discuss.hashicorp.com/t/error-error-initializing-docker-client-protocol-not-available/10886 "2020-07-01T19:40:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshinevar](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jshinevar/32/8862_2.png) [@jshinevar](https://discuss.hashicorp.com/u/jshinevar)\
**Post date:** [July 1, 2020, 7:40pm UTC](https://discuss.hashicorp.com/t/error-error-initializing-docker-client-protocol-not-available/10886/1 "2020-07-01T19:40:22Z")

</div>

I am attempting to go through the initial setup shown here:

> **[Install Terraform | Terraform - HashiCorp Learn](https://learn.hashicorp.com/terraform/azure/install)**
>
> How to install Terraform and verify installation.

  
and I have installed Docker-Desktop using choclatey. I opened Docker-Desktop and ran through the setup in that application. I also have used choclatey to install Terraform. When I get to the step to run terraform apply I get the following error:

```auto
Error: Error initializing Docker client: protocol not available

  on <empty> line 0:
  (source code not available)

```

I am lost on where to go from here. Can someone help? Thanks.

---

<div class="post-metadata">

**Author:** ![tgriggy](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tgriggy/32/9213_2.png) [@tgriggy](https://discuss.hashicorp.com/u/tgriggy)\
**Post date:** [July 9, 2020, 2:07pm UTC](https://discuss.hashicorp.com/t/error-error-initializing-docker-client-protocol-not-available/10886/2 "2020-07-09T14:07:56Z")

</div>

found a couple posts that reference this error, hyperlinked below. Here is the suggested work-around - add the following block to your main.tf:

```
provider "docker" {
  version = "~> 2.7"
  host = "npipe:////.//pipe//docker_engine"
}

```

Reference links:

> <https://github.com/terraform-providers/terraform-provider-docker/issues/180>
>
> Terraform Version
> Terraform v0.12.7
> provider.aws v2.25.0
> provider.docker v2.2.0
> Microsoft Windows \[Version 10.0.18362.295\]
> Terraform Configuration Files
> terraform {
> required\_version = "0.12.7"
> }
> variable "region" {
> default = "us-west-1"
> }
> provider "aws" {
> ...

> <https://serverfault.com/questions/1023662/terraform-error-error-initializing-docker-client-protocol-not-available>
