3

如果我们使用诸如 的标志启动 docker 守护程序-H 1.2.3.4:7777/var/run/docker.sock则不会创建文件并且各种stack操作(例如stack docker pull失败):

$ 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

我们如何才能告诉stack在特定主机上使用守护程序呢?

4

1 回答 1

2

这最初是在GitHub 上提出的。答案是设置DOCKER_HOST环境变量,例如使用DOCKER_HOST="1.2.3.4:7777".

于 2015-09-10T13:59:37.037 回答