Docker Server Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(21 intermediate revisions by the same user not shown)
Line 9: Line 9:


=Enable at Boot=
=Enable at Boot=
==systemd==


<pre>
<pre>
Line 14: Line 16:
systemctl start docker
systemctl start docker
</pre>
</pre>
==init.d==


=Start=
=Start=


Use <tt>dockerd</tt>, which is the utility to start the Docker in daemon mode.
==systemd==
 
<pre>
systemctl start docker
</pre>
 
A docker server running as root:


<pre>
<pre>
[root@docker-server run]# dockerd
root       665    1  0 16:00 ?        00:00:02 /usr/bin/dockerd
INFO[0000] libcontainerd: new containerd process, pid: 7369
root      749  665  0 16:00 ?        00:00:01 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 max=4096
INFO[0000] [graphdriver] using prior storage driver: overlay
INFO[0000] Graph migration to content-addressability took 0.00 seconds
INFO[0000] Loading containers: start.
INFO[0000] Firewalld running: false
INFO[0000] 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[0000] Loading containers: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon                                commit=c6d412e graphdriver=overlay version=17.03.1-ce
INFO[0000] API listen on /var/run/docker.sock
</pre>
</pre>
==init.d==
As root:
<pre>
system docker start
</pre>
=Procedures=
* [[Provision Docker Storage on a Dedicated Block Device]]
* [[Docker Server Re-Initialization]]
* [[Docker Server Log Management]]
* [[Secure Docker Daemon]]
* [[Configure Docker Server to Listen on TCP|Configure Docker Server to Listen on TCP]]
=Subjects=
* [[Docker Server Runtime]]
=Monitoring=
[[lvs]] reports the percentage of external storage used.
=Accumulation Points=
==The Local Registry==
Stores images in the "container-thinpool" logical volume, statistics available with:
lvs -a
Local images can be inspected with
[[docker images]]
==/var/lib/docker/containers==
Each running or stopped container has  a corresponding directory there.
To remove exited containers: {{Internal|Docker_rm#Remove_Exited_Containers|docker rm - remove exited containers}}


=Troubleshooting=
=Troubleshooting=

Latest revision as of 18:33, 19 April 2018

Internal

Relevance

  • Docker 17.03.1-ce

Enable at Boot

systemd

systemctl enable docker
systemctl start docker

init.d

Start

systemd

systemctl start docker

A docker server running as root:

root       665     1  0 16:00 ?        00:00:02 /usr/bin/dockerd
root       749   665  0 16:00 ?        00:00:01 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc

init.d

As root:

system docker start

Procedures

Subjects

Monitoring

lvs reports the percentage of external storage used.

Accumulation Points

The Local Registry

Stores images in the "container-thinpool" logical volume, statistics available with:

lvs -a

Local images can be inspected with

docker images

/var/lib/docker/containers

Each running or stopped container has a corresponding directory there.

To remove exited containers:

docker rm - remove exited containers

Troubleshooting