Reputation: 2066
If we start the docker daemon with a flag such as -H 1.2.3.4:7777
, the /var/run/docker.sock
file doesn't get created and various stack
operations such as stack docker pull
fail:
$ stack docker pull
Pulling image from registry: 'tweag/haskellr:latest'
Post http:///var/run/docker.sock/v1.20/images/create?fromImage=tweag%2Fhaskellr%3Alatest: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
Could not pull Docker image:
tweag/haskellr:latest
There may not be an image on the registry for your resolver's LTS version in
stack.yaml
How can we tell stack
to use the daemon at the specific host instead?
Upvotes: 3
Views: 147
Reputation: 2066
This was initially asked on GitHub. The answer is is to set DOCKER_HOST
environment variable, for example with DOCKER_HOST="1.2.3.4:7777"
.
Upvotes: 2