1. Docker About¶
1.1. What is docker?¶










1.2. Architecture¶
1.3. Image vs Container¶
1.4. Layers¶
- Layer¶
Diff between outputs of Dockerfile
RUN
command while building an image

Figure 1.3. Layers¶

Figure 1.4. Layers¶

Figure 1.5. Container Layers¶

Figure 1.6. Container Layers¶
1.5. Open Container Initiative¶
The Open Container Initiative is an open governance structure for the express purpose of creating open industry standards around container formats and runtimes.
Established in June 2015 by Docker and other leaders in the container industry, the OCI currently contains two specifications: the Runtime Specification (runtime-spec) and the Image Specification (image-spec). The Runtime Specification outlines how to run a "filesystem bundle" that is unpacked on disk. At a high-level an OCI implementation would download an OCI Image then unpack that image into an OCI Runtime filesystem bundle. At this point the OCI Runtime Bundle would be run by an OCI Runtime.
1.6. Where Docker store logs¶
Ubuntu (old using upstart) -
/var/log/upstart/docker.log
Ubuntu (new using systemd) -
sudo journalctl -fu docker.service
Amazon Linux AMI -
/var/log/docker
Boot2Docker -
/var/log/docker.log
Debian GNU/Linux -
/var/log/daemon.log
CentOS -
/var/log/message | grep docker
CoreOS -
journalctl -u docker.service
Fedora -
journalctl -u docker.service
Red Hat Enterprise Linux Server -
/var/log/messages | grep docker
OpenSuSE -
journalctl -u docker.service
OSX -
~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log/docker.log
Windows -
Get-EventLog -LogName Application -Source Docker -After (Get-Date).AddMinutes(-5) | Sort-Object Time
1.7. Where Docker store containers¶
Docker rootfull
/var/lib/docker/containers
Docker rootless
~/.local/share/docker/
Docker rootfull:
$ docker info |grep 'Docker Root Dir'
Docker Root Dir: /var/lib/docker
Docker rootless:
$ docker info |grep 'Docker Root Dir'
Docker Root Dir: /home/ubuntu/.local/share/docker