{"id":138,"date":"2018-08-10T12:05:26","date_gmt":"2018-08-10T16:05:26","guid":{"rendered":"http:\/\/www.dev-notes.com\/blog\/?p=138"},"modified":"2019-11-19T13:02:01","modified_gmt":"2019-11-19T18:02:01","slug":"docker-101-training-notes-part-3-of-4","status":"publish","type":"post","link":"https:\/\/www.dev-notes.com\/blog\/2018\/08\/10\/docker-101-training-notes-part-3-of-4\/","title":{"rendered":"Docker 101 Training Notes"},"content":{"rendered":"<p>I attended a four part Docker 101 Training course at Virginia Tech. This post contains notes on part 3 of 4.<\/p>\n<p>Understanding what&#8217;s in an image:<\/p>\n<pre class=\"p1\"><span class=\"s1\">$ docker ps<\/span>\n\n<span class=\"s1\">CONTAINER ID<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>IMAGE <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>COMMAND<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>CREATED <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>STATUS<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>PORTS<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>NAMES<\/span>\n<span class=\"s1\">6027bb44a67d<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>zookeeper <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"\/docker-entrypoint.\u2026\" <span class=\"Apple-converted-space\">&nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>Up 2 days <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2181\/tcp, 2888\/tcp, 3888\/tcp <span class=\"Apple-converted-space\">&nbsp; <\/span>hyku_zoo1_1<\/span>\n<span class=\"s1\">6a9585f4b0bc<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>zookeeper <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"\/docker-entrypoint.\u2026\" <span class=\"Apple-converted-space\">&nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>Up 2 days <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2181\/tcp, 2888\/tcp, 3888\/tcp <span class=\"Apple-converted-space\">&nbsp; <\/span>hyku_zoo2_1<\/span>\n<span class=\"s1\">5bd742a7314c<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>zookeeper <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"\/docker-entrypoint.\u2026\" <span class=\"Apple-converted-space\">&nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>Up 2 days <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2181\/tcp, 2888\/tcp, 3888\/tcp <span class=\"Apple-converted-space\">&nbsp; <\/span>hyku_zoo3_1<\/span><\/pre>\n<pre><span class=\"s1\">$ docker image history zookeeper<\/span>\n\n<span class=\"s1\">IMAGE <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>CREATED <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>CREATED BY<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>SIZE<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>COMMENT<\/span>\n<span class=\"s1\">397be0d8fa45<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>CMD [\"zkServer.sh\" \"start\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENTRYPOINT [\"\/docker-entr\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop) COPY file:5cb6c695778a88d6\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>941B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV PATH=\/usr\/local\/sbin:\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>EXPOSE 2181\/tcp 2888\/tcp \u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>VOLUME [\/data \/datalog]<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop) WORKDIR \/zookeeper-3.4.12 <span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>|2 DISTRO_NAME=zookeeper-3.4.12 GPG_KEY=586E\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>60MB <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ARG DISTRO_NAME=zookeeper\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ARG GPG_KEY=586EFEF859AF2\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c set -ex; <span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>adduser -D \"$ZOO_USE\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>4.82kB <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV ZOO_USER=zookeeper ZO\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c apk add --no-cache <span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>bash <span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>s\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>4.21MB <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c set -x<span class=\"Apple-converted-space\">&nbsp; <\/span>&amp;&amp; apk add --no-cache <span class=\"Apple-converted-space\">&nbsp; <\/span>o\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>77.8MB <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV JAVA_ALPINE_VERSION=8\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 weeks ago <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV JAVA_VERSION=8u171 <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2 months ago<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV PATH=\/usr\/local\/sbin:\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2 months ago<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV JAVA_HOME=\/usr\/lib\/jv\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2 months ago<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c { <span class=\"Apple-converted-space\">&nbsp; <\/span>echo '#!\/bin\/sh'; <span class=\"Apple-converted-space\">&nbsp; <\/span>echo 'set\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>87B<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>2 months ago<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>ENV LANG=C.UTF-8 <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 months ago<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop)<span class=\"Apple-converted-space\">&nbsp; <\/span>CMD [\"\/bin\/sh\"]<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>0B <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/span><\/span>\n<span class=\"s1\">&lt;missing&gt; <span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>7 months ago<span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\/bin\/sh -c #(nop) ADD file:093f0723fa46f6cdb\u2026 <span class=\"Apple-converted-space\">&nbsp; <\/span>4.15MB&nbsp;\n<\/span><\/pre>\n<p>Create a tar of a Docker image:<\/p>\n<pre class=\"p1\"><span class=\"s1\">$ docker image save zookeeper | tar x -<\/span>\n<span class=\"s1\">$ ls -latr<\/span>\n\n<span class=\"s1\">total 32<\/span>\n<span class=\"s1\">-rw-r--r-- <span class=\"Apple-converted-space\">&nbsp; <\/span>1 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff<span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>92 Dec 31<span class=\"Apple-converted-space\">&nbsp; <\/span>1969 repositories<\/span>\n<span class=\"s1\">-rw-r--r-- <span class=\"Apple-converted-space\">&nbsp; <\/span>1 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>667 Dec 31<span class=\"Apple-converted-space\">&nbsp; <\/span>1969 manifest.json<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 f489fb9bc024e38efcd28c3d574b04568ad8db2ecf4e04f850e230b52970c5b4<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 bc689ee72c370143bedbce7354c4ab6d875c9ff0770fa5fc30767e43eefe5f69<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 b7c8de9af3495335f18f0ed1dde5f34a589d06d84e25c7fe75eb2987a8e5205a<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 8c3cedd6ec82ada9c5ffbbdce49e2e004bf3e9f8af1d0c986af084ee555e6f5b<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 498654318d0999ce36c7b90901ed8bd8cb63d86837cb101ea1ec9bb092f44e59<\/span>\n<span class=\"s1\">-rw-r--r-- <span class=\"Apple-converted-space\">&nbsp; <\/span>1 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff<span class=\"Apple-converted-space\">&nbsp; <\/span>7338 Jun 16 05:16 397be0d8fa458782ea28b39e9a7480272519c522f6416ee3cae2efe204f324d3.json<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 26353606c6538cd3386157cf987e132c9809e0b8fa413fe9a6f35b20a0884ccc<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>5 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>160 Jun 16 05:16 146c29a4165a3791184d9b4631a0f0488f8eb4a282d606ed53b484fbf14de7fe<\/span>\n<span class=\"s1\">drwxr-xr-x <span class=\"Apple-converted-space\">&nbsp; <\/span>7 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>224 Aug 10 12:17 ..<\/span>\n<span class=\"s1\">drwxr-xr-x<span class=\"Apple-converted-space\">&nbsp; <\/span>12 janicekim<span class=\"Apple-converted-space\">&nbsp; <\/span>staff <span class=\"Apple-converted-space\">&nbsp; <\/span>384 Aug 10 14:33 .<\/span><\/pre>\n<p>Look at the generated manifest:<\/p>\n<pre class=\"p1\"><span class=\"s1\">$ cat manifest.json | python -m json.tool <\/span>\n\n<span class=\"s1\">[<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>{<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"Config\": \"397be0d8fa458782ea28b39e9a7480272519c522f6416ee3cae2efe204f324d3.json\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"Layers\": [<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"498654318d0999ce36c7b90901ed8bd8cb63d86837cb101ea1ec9bb092f44e59\/layer.tar\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"f489fb9bc024e38efcd28c3d574b04568ad8db2ecf4e04f850e230b52970c5b4\/layer.tar\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"26353606c6538cd3386157cf987e132c9809e0b8fa413fe9a6f35b20a0884ccc\/layer.tar\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"8c3cedd6ec82ada9c5ffbbdce49e2e004bf3e9f8af1d0c986af084ee555e6f5b\/layer.tar\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"b7c8de9af3495335f18f0ed1dde5f34a589d06d84e25c7fe75eb2987a8e5205a\/layer.tar\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"146c29a4165a3791184d9b4631a0f0488f8eb4a282d606ed53b484fbf14de7fe\/layer.tar\",<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"bc689ee72c370143bedbce7354c4ab6d875c9ff0770fa5fc30767e43eefe5f69\/layer.tar\"<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>],<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"RepoTags\": [<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>\"zookeeper:latest\"<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>]<\/span>\n<span class=\"s1\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>}<\/span>\n<span class=\"s1\">]<\/span><\/pre>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Each layer shows actual filesystem changes<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The layers are unioned together, they provide a full filesystem<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Each layer can add files as needed<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Files in \u201chigher\u201d layers replace the same file in \u201clower\u201d layers<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\">Deleted files are represented in a layer as a \u201cwhiteout\u201d file<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Whiteout files are only used by the filesystem driver and not visible in the merged filesystem<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Popular Base Distributions<\/p>\n<ul>\n<li>Ubuntu\/Debian &#8211; larger and familiar, results in larger image size<\/li>\n<li>Alpine Linux &#8211; smaller results in smaller image size<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I attended a four part Docker 101 Training course at Virginia Tech. This post contains notes on part 3 of 4. Understanding what&#8217;s in an image: $ docker ps CONTAINER ID&nbsp; &nbsp; &nbsp; &nbsp; IMAGE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COMMAND&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CREATED &nbsp; &nbsp; &nbsp; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.dev-notes.com\/blog\/2018\/08\/10\/docker-101-training-notes-part-3-of-4\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Docker 101 Training Notes&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-138","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/comments?post=138"}],"version-history":[{"count":10,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/138\/revisions"}],"predecessor-version":[{"id":347,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/138\/revisions\/347"}],"wp:attachment":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/media?parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/categories?post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/tags?post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}