Docker Server Runtime: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "<font color=red> Check if Docker is running: # systemctl is-active docker If Docker has not yet been started on the host, enable and start the service: # systemctl enable do...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
* [[Docker Server Operations]]
=Process=
==OpenShift Docker==
<pre>
root  1150  1  0 12:06 ? 00:00:00 /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
    --selinux-enabled
    --log-driver=journald
    --signature-verification=false
    --storage-driver devicemapper
    --storage-opt dm.fs=xfs
    --storage-opt dm.thinpooldev=/dev/mapper/docker_vg-docker--pool
    --storage-opt dm.use_deferred_removal=true
    --add-registry registry.access.redhat.com
root 1174  1150  0 12:06 ?  00:00:00 /usr/bin/docker-containerd-current
    -l unix:///var/run/docker/libcontainerd/docker-containerd.sock
    --shim docker-containerd-shim
    --metrics-interval=0
    --start-timeout 2m
    --state-dir /var/run/docker/libcontainerd/containerd
    --runtime docker-runc
    --runtime-args --systemd-cgroup=true
</pre>
=Configuration=
/etc/docker
/etc/sysconfig/docker-storage
=Storage=
/var/lib/docker
<font color=red>
<font color=red>
Check if Docker is running:


# systemctl is-active docker
How do I know that the space consumed for images and containers is allocated in the thin pool, on the different physical device, and not in /var/lib/docker on the root filesystem.
If Docker has not yet been started on the host, enable and start the service:


# systemctl enable docker
Verify after a while that stuff is stored in external storage.
# systemctl start docker
</font>
If Docker is already running, re-initialize Docker:


This will destroy any containers or images currently on the host.
=Logging=
# systemctl stop docker
# rm -rf /var/lib/docker/*
# systemctl restart docker
If there is any content in /var/lib/docker/, it must be deleted. Files will be present if Docker has been used prior to the installation of OpenShift Container Platform.


Then go to https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html#reconfiguring-docker-storage
Container logs: /var/lib/docker/containers/<hash>/<hash>-json.log
</font>

Latest revision as of 02:29, 30 June 2017

Internal

Process

OpenShift Docker

root  1150  1  0 12:06 ? 00:00:00 /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 
    --selinux-enabled 
    --log-driver=journald 
    --signature-verification=false 
    --storage-driver devicemapper 
    --storage-opt dm.fs=xfs 
    --storage-opt dm.thinpooldev=/dev/mapper/docker_vg-docker--pool 
    --storage-opt dm.use_deferred_removal=true 
    --add-registry registry.access.redhat.com

root 1174  1150  0 12:06 ?  00:00:00 /usr/bin/docker-containerd-current 
    -l unix:///var/run/docker/libcontainerd/docker-containerd.sock 
    --shim docker-containerd-shim 
    --metrics-interval=0 
    --start-timeout 2m 
    --state-dir /var/run/docker/libcontainerd/containerd 
    --runtime docker-runc 
    --runtime-args --systemd-cgroup=true

Configuration

/etc/docker

/etc/sysconfig/docker-storage

Storage

/var/lib/docker

How do I know that the space consumed for images and containers is allocated in the thin pool, on the different physical device, and not in /var/lib/docker on the root filesystem.

Verify after a while that stuff is stored in external storage.

Logging

Container logs: /var/lib/docker/containers/<hash>/<hash>-json.log