docker 对接器错误:无法为服务创建容器,没有此类文件或目录

ddarikpa  于 2023-01-20  发布在  Docker
关注(0)|答案(8)|浏览(178)

我正在尝试通过docker-compose安装CKAN:http://docs.ckan.org/en/2.8/maintaining/installing/install-from-docker-compose.html
如果我尝试使用以下内容进行构建:

docker-compose up -d --build

我不断得到:

ERROR: for db  Cannot create container for service db: no such file or directory
ERROR: compose.cli.main.main: Encountered errors while bringing up the project.

使用verbose标志,我得到:

compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- (u'docker_db')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.25/images/docker_db/json HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker inspect_image -> {u'Architecture': u'amd64',
 u'Author': u'Open Knowledge',
 u'Comment': u'',
 u'Config': {u'ArgsEscaped': True,
             u'AttachStderr': False,
             u'AttachStdin': False,
             u'AttachStdout': False,
             u'Cmd': [u'postgres'],
             u'Domainname': u'',
             u'Entrypoint': [u'docker-entrypoint.sh'],
...
compose.service.build_container_labels: Added config hash: dfb16feda9d1de6f3a84b0a6e1ecee1a8d041d06d5676351f8f723b05c4f6f03
compose.cli.verbose_proxy.proxy_callable: docker create_host_config <- (device_read_iops=None, mem_swappiness=None, links=[], oom_score_adj=None, blkio_weight=None, cpu_count=None, cpuset_cpus=None, dns_search=None, pid_mode=None, init_path=None, log_config={'Type': u'', 'Config': {}}, cpu_quota=None, read_only=None, cpu_percent=None, device_read_bps=None, storage_opt=None, init=None, dns=None, volumes_from=[], ipc_mode=None, mem_reservation=None, security_opt=None, shm_size=None, device_write_iops=None, dns_opt=None, cgroup_parent=None, group_add=None, network_mode=u'docker_default', volume_driver=None, oom_kill_disable=None, userns_mode=None, tmpfs=[], nano_cpus=None, port_bindings={}, isolation=None, memswap_limit=None, restart_policy=None, blkio_weight_device=None, devices=None, extra_hosts=None, binds=[u'docker_pg_data:/var/lib/postgresql/data:rw'], sysctls=None, pids_limit=None, device_write_bps=None, cap_add=None, mounts=None, mem_limit=None, runtime=None, cap_drop=None, privileged=False, ulimits=None, cpu_shares=None)
compose.cli.verbose_proxy.proxy_callable: docker create_host_config -> {'Binds': [u'docker_pg_data:/var/lib/postgresql/data:rw'],
 'Links': [],
 'LogConfig': {'Config': {}, 'Type': u''},
 'NetworkMode': u'docker_default',
 'PortBindings': {},
 'VolumesFrom': []}
compose.cli.verbose_proxy.proxy_callable: docker create_container <- (name='db', image=u'docker_db', labels={u'com.docker.compose.service': u'db', u'com.docker.compose.project': u'docker', u'com.docker.compose.config-hash': 'dfb16feda9d1de6f3a84b0a6e1ecee1a8d041d06d5676351f8f723b05c4f6f03', u'com.docker.compose.version': u'1.19.0', u'com.docker.compose.oneoff': u'False', u'com.docker.compose.container-number': '1'}, host_config={'NetworkMode': u'docker_default', 'Links': [], 'PortBindings': {}, 'Binds': [u'docker_pg_data:/var/lib/postgresql/data:rw'], 'LogConfig': {'Type': u'', 'Config': {}}, 'VolumesFrom': []}, environment=[u'POSTGRES_PASSWORD=uuimwc', u'DS_RO_PASS=uuimwc'], volumes={u'/var/lib/postgresql/data': {}}, detach=True, networking_config={u'EndpointsConfig': {u'docker_default': {u'IPAMConfig': {}, u'Aliases': ['db']}}})
compose.parallel.feed_queue: Pending: set([<Service: ckan>])
compose.parallel.feed_queue: Pending: set([])
Creating db ... error
compose.parallel.feed_queue: Pending: set([])
compose.parallel.feed_queue: Pending: set([])
urllib3.connectionpool._make_request: http://localhost:None "POST /v1.25/containers/create?name=db HTTP/1.1" 500 40
compose.parallel.parallel_execute_iter: Failed: ServiceName(project=u'docker', service='db', number=1)
compose.parallel.feed_queue: Pending: set([])

ERROR: for db  Cannot create container for service db: no such file or directory
compose.parallel.parallel_execute_iter: Failed: <Service: db>
compose.parallel.feed_queue: Pending: set([<Service: ckan>])
compose.parallel.feed_queue: <Service: ckan> has upstream errors - not processing
compose.parallel.parallel_execute_iter: Failed: <Service: ckan>

有没有人能告诉我如何找出这是什么原因?错误似乎并不是真的有意义,我怎么才能找出它丢失了什么文件或目录?

x759pob2

x759pob21#

我有这同样的问题当我删除这目录手工
rm-fr/变量/库/docker/卷/[您的卷]
我的解决方案是删除Docker中的卷,首先列出现有卷
Docker体积ls
找到你要删除的文件
Docker卷rm [您的卷]
然后我就能做 Docker 作曲了

qcuzuvrc

qcuzuvrc2#

尝试:
docker volume prune
docker system prune
它为我工作后,删除卷从:/var/lib/停靠器/卷/[我的卷]

az31mfrm

az31mfrm3#

在文件共享资源中添加工作项目。

amrnrhlw

amrnrhlw4#

添加所需的目录到文件共享资源解决了我的问题!!!
Docker桌面-〉设置-〉资源-〉文件共享-〉添加所需的目录中的yml文件位于向上

91zkwejq

91zkwejq5#

重新启动我的笔记本电脑在我的特殊情况下有帮助,这里提到的docker命令没有,但释放了一些磁盘空间

s4n0splo

s4n0splo6#

1.cd (your run project content) 2.then run : docker-compose down (close the server关闭服务) 3.now,you can delete it。

hgb9j2n6

hgb9j2n67#

我有这个问题,我绕过它重新安装Docker桌面和它的一些如何工作...

ego6inou

ego6inou8#

重新安装docker和docker-compose解决了所有问题。

相关问题