728x90
반응형
도커 명령어 실행 시 아래 오류가 발생하는 경우가 있다.
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
이때 도커를 실행해보면 또 오류가 나타난다.
$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
상태 확인
도커 서비스의 상태를 확인해보자.
$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2017-07-26 14:30:21 EDT; 8min ago
Docs: http://docs.docker.com
Process: 5835 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --authorization-plugin=rhel-push-plugin --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
Main PID: 5835 (code=exited, status=1/FAILURE)
Jul 26 14:30:21: Starting Docker Application Container Engine...
Jul 26 14:30:21 dockerd-current[5835]: time="2023-04-17T14:30:21-04:00" level=fatal msg="unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF\n"
Jul 26 14:30:21 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jul 26 14:30:21 systemd[1]: Failed to start Docker Application Container Engine.
Jul 26 14:30:21 systemd[1]: Unit docker.service entered failed state.
Jul 26 14:30:21 systemd[1]: docker.service failed.
원인 파악
상태 메시지에 따라 다르나, 필자의 경우 에러 메시지 중 /etc/docker/daemon.json 이 오류가 있다는 것을 알 수 있었다.
따라서 해당 파일을 지워서 해결하였다.
728x90
반응형