Tools, FAQ, Tutorials:
Starting Docker Daemon on CentOS
How to start Docker Daemon, "dockerd", on CentOS systems?
✍: FYIcenter.com
If you have installed Docker on your CentOS system,
you follow these steps to start the Docker Daemon, "dockerd".
1. Verify Docker installation path.
fyicenter$ which dockerd /usr/bin/dockerd
2. Start Docker Daemon using the "dockerd" command. But it needs "root" permission. It still fails to start Container Daemon.
fyicenter$ dockerd
INFO[09:51:59.778175452+08:00] Starting up
dockerd needs to be started with root.
To see how to run dockerd in rootless mode with unprivileged user,
see the documentation
fyicenter$ sudo dockerd &
INFO[...] Starting up
WARN[...] could not change group /var/run/docker.sock to docker: group docker not found
INFO[...] parsed scheme: "unix" module=grpc
INFO[...] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[...] ClientConn switching balancer to "pick_first" module=grpc
WARN[...] grpc: addrConn.createTransport failed to connect
to {unix:///run/containerd/containerd.sock <nil> 0 <nil>}.
Err :connection error: desc = "transport: Error while dialing
dial unix /run/containerd/containerd.sock: connect: connection refused".
Reconnecting... module=grpc
3. Log in as "root" and start Docker Daemon again.
fyicenter# dockerd & INFO[...] Starting up WARN[...] could not change group /var/run/docker.sock to docker: group docker not found INFO[...] libcontainerd: started new containerd process pid=3145420 INFO[...] parsed scheme: "unix" module=grpc INFO[...] scheme "unix" not registered, fallback to default scheme module=grpc INFO[...] ClientConn switching balancer to "pick_first" module=grpc INFO[...] starting containerd version=v1.4.6 INFO[...] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1 INFO[...] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1 INFO[...] serving... address=/var/run/docker/containerd/containerd-debug.sock INFO[...] serving... address=/var/run/docker/containerd/containerd.sock.ttrpc INFO[...] serving... address=/var/run/docker/containerd/containerd.sock INFO[...] containerd successfully booted in 0.023700s INFO[...] using prior storage driver: overlay2 WARN[...] Your kernel does not support cgroup blkio weight WARN[...] Your kernel does not support cgroup blkio weight_device INFO[...] Loading containers: start. INFO[...] Firewalld: docker zone already exists, returning INFO[...] Firewalld: interface docker0 already part of docker zone, returning INFO[...] Firewalld: interface docker0 already part of docker zone, returning INFO[...] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address INFO[...] Firewalld: interface docker0 already part of docker zone, returning INFO[...] Loading containers: done. INFO[...] Docker daemon commit=b0f5bc3 graphdriver(s)=overlay2 version=20.10.7 INFO[...] Daemon has completed initialization INFO[...] API listen on /var/run/docker.sock
4. Verify Docker Daemon.
fyicenter$ sudo ps -efl | grep docker
- 264001 - 12:24 pts/14 00:00:00 dockerd
- 275268 - 12:24 ? 00:00:00 containerd --config \
/var/run/docker/containerd/containerd.toml --log-level info
fyicenter$ sudo docker info
Client:
Context: default
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.7
Storage Driver: overlay2
Backing Filesystem: xfs
...
5. Possible issue when starting the Docker binary package is the $PATH access to the "containerd" command. You need to add the "./docker" directory to $PATH.
fyicenter$ su
fyicenter# ./docker/dockerd
INFO[09:53:51.388587173+08:00] Starting up
failed to start containerd: exec: "containerd":
executable file not found in $PATH
fyicenter# export PATH=/home/fyicenter/docker:$PATH
fyicenter# ./docker/dockerd
...
INFO[...] starting containerd version=v1.4.6
INFO[...] containerd successfully booted in 0.023700s
INFO[...] Docker daemon commit=b0f5bc3 graphdriver(s)=overlay2 version=20.10.7
INFO[...] Daemon has completed initialization
INFO[...] API listen on /var/run/docker.sock
2023-03-17, ∼4392🔥, 0💬
Popular Posts:
FYIcenter.com Online Tools: FYIcenter JSON Validator and Formatter FYIcenter JSON to XML Converter F...
Where to find tutorials on RSS specifications? I want to learn it to describe my API services. Here ...
How to register and get an application ID from Azure AD? The first step to use Azure AD is to regist...
FYIcenter JSON Validator and Formatter is an online tool that checks for syntax errors of JSON text ...
Where to find tutorials on OpenID? Here is a large collection of tutorials to answer many frequently...