简体   繁体   English

docker-compose | 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行?

[英]docker-compose | Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I'm getting this error on alpine base docker container: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"我在 alpine base docker 容器上收到此错误:“无法连接到 unix:///var/run/docker.sock 上的 Docker 守护程序。docker 守护程序是否正在运行?” when I running the following command: docker images I'm using the following docker-compose:当我运行以下命令时:docker images 我正在使用以下 docker-compose:

services:
  alpine:
    build:
      context: ./
      dockerfile: Dockerfile
#      command: -H unix:///var/run/docker.sock
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

and this is my dockerFile:这是我的 dockerFile:

FROM yossigilad/alpine8:v1 AS prepare
#FROM openjdk:8-jdk-alpine AS prepare
RUN mkdir -p /app/source
#copying all project files to docker
COPY  . /app/source
WORKDIR /app/source
RUN docker images

when I running the container with this command its ok docker run -ti -v /var/run/docker.sock:/var/run/docker.sock DOCKER_ID当我用这个命令运行容器时,它 docker run -ti -v /var/run/docker.sock:/var/run/docker.sock DOCKER_ID

What I'm missing?我缺少什么?

尝试以下对我有用的步骤

  1. service docker stop
  2. cd /var/run/docker/libcontainerd
  3. rm -rf containerd/*
  4. rm -f docker-containerd.pid
  5. service docker start
  6. docker run

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker compose in bitbucket - 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? - docker compose in bitbucket - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker中的jenkins-无法通过unix:///var/run/docker.sock连接到Docker守护程序。 泊坞窗守护程序正在运行吗? - jenkins in docker - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? macOS - docker:无法连接到 unix:///var/run/docker.sock 的 Docker 守护程序。 docker 守护程序是否正在运行? - macOS - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker:无法连接到unix:///var/run/docker.sock上的Docker守护程序。 docker守护程序是否正在运行? - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker:无法连接到位于 unix:///var/run/docker.sock 的 Docker 守护进程。 docker 守护程序是否正在运行? - docker:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? "<i>ERROR :Cannot connect to the Docker daemon at unix:\/\/\/var\/run\/docker.sock.<\/i>错误:无法连接到 unix:\/\/\/var\/run\/docker.sock 上的 Docker 守护程序。<\/b> <i>Is the docker daemon running<\/i> docker 守护进程是否正在运行<\/b>" - ERROR :Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running CentOS 7 - 无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - CentOS 7 - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 如何修复错误“无法连接到 unix:///var/run/docker.sock 的 Docker 守护程序。 docker 守护程序是否正在运行” - How to fix the error “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running” Gitlab Runner 无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - Gitlab Runner Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 大厅:无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - Concourse: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM