https://pulumi.com logo
Title
c

calm-gpu-56173

07/13/2021, 11:50 PM
Hello There i was trying to create ECS using pulumi.. but its failing with error: Error: ' docker build ./app -t 12fda807-container' failed with exit code 1.. Any idea / help appreciated..
iagnostics:
19:42:29
awsx:ecr:Repository (xoe-expres-app-repo):
19:42:29
error: Error: ' docker build ./app -t 12fda807-container' failed with exit code 1
19:42:29
```
19:42:29
at /tmp/build/23bf5af8/source-repo/infra/node_modules/@pulumi/docker.ts:592:15``` 19:42:29
at Generator.next (<anonymous>)
19:42:29
at fulfilled (/tmp/build/23bf5af8/source-repo/infra/node_modules/@pulumi/docker/docker.js:18:58)
19:42:29
```
19:42:29
error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
19:42:29
time="2021-07-13T23:42:27Z" level=error msg="failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or directory"```
i am using platform: linux image_resource: type: docker-image source: repository: pulumi/pulumi
if i use repository : pulumi/pulumi-nodejs then i get
Diagnostics:
19:26:48
awsx:ecr:Repository (xoe-expres-app-repo):
19:26:48
error: spawn docker ENOENT
19:26:48
```
19:26:48
error: Error: No 'docker' command available on PATH: Please install to use container 'build' mode.
19:26:48
at /tmp/build/23bf5af8/source-repo/infra/node_modules/@pulumi/docker.ts:115:19``` 19:26:48
at Generator.throw (<anonymous>)
19:26:48
at rejected (/tmp/build/23bf5af8/source-repo/infra/node_modules/@pulumi/docker/docker.js:19:65)
19:26:48
at processTicksAndRejections (internal/process/task_queues.js:95:5)
b

billowy-army-68599

07/14/2021, 2:52 AM
Cannot connect to the Docker daemon at unix:///var/run/docker.sock
you don't have docker running on your local machine. make sure the service is started
c

calm-gpu-56173

07/14/2021, 1:46 PM
Hi @billowy-army-68599 any suggestion which container is best suited ? i was using below..
platform: linux image_resource: type: docker-image source: repository: pulumi/pulumi-nodejs tag: "3.6.1"
are there any containers available which has pre build docker image with pulumi & nodejs ?
b

billowy-army-68599

07/14/2021, 2:25 PM
@calm-gpu-56173 are you trying to build a docker image from inside a docker container?
c

calm-gpu-56173

07/14/2021, 2:26 PM
yes concourse ci/cd design is such way
we spin up a container & then run scripts
--- platform: linux image_resource: type: docker-image source: repository: pulumi/pulumi tag: "latest"
b

billowy-army-68599

07/14/2021, 2:26 PM
Right, but you’ll need to enable docker in docker for this to work
It won’t work by default
c

calm-gpu-56173

07/14/2021, 2:28 PM
agree
error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
b

billowy-army-68599

07/14/2021, 2:28 PM
You’ll need to build your own image
We don’t have one with support for this I’m afraid