使用以下命令portainer可以正常工作:
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer -H unix:///var/run/docker.sock
但在Ansible中失败
- name: Create portainer
docker_container:
name: dockerweb
image: portainer/portainer
command: "-H unix:///var/run/docker.sock"
state: started
ports:
- "9000:9000"
如何在Docker容器中传递-H标志?