在以前运行的项目(几周)上运行docker-compose up -d时,构buildweb容器时出现以下错误:
» |root| ‡ master * docker-compose up -d Starting gateway_web_1 ERROR: for web Cannot start service web: updating the store state of sandbox failed: failed to update store for object type *libnetwork.sbState: json: cannot unmarshal string into Go struct field sbState.ExtDNS of type libnetwork.extDNSEntry ERROR: Encountered errors while bringing up the project.
我已经重新启动了Docker服务,我已经重新安装了Docker,但是我无法通过这个错误,而且我已经用完了一些地方。
这是我docker-compose.yml
version: '2' services: web: build: ./docker-lemp ports: - 8080 networks: - front-tier - back-tier volumes: - ./public:/var/www - ./default:/etc/nginx/sites-enabled/default redis: image: redis ports: - <public IP>:6379:6379 links: - web networks: - back-tier - front-tier lb: image: dockercloud/haproxy ports: - <public IP>:443:443 - <public IP>:80:80 links: - web networks: - front-tier - back-tier volumes: - /var/run/docker.sock:/var/run/docker.sock - ./haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg environment: <SSL stuff> networks: front-tier: driver: bridge back-tier: driver: bridge
谢谢!
这是通过使用rm -rf /var/lib/docker删除Docker数据存储来解决的。 然后重新启动Docker(重新创build数据存储)后,问题得到解决,Docker再次能够创build和启动容器。