Docker/Image/02 Layer: Unterschied zwischen den Versionen
Aus Foxwiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
== Image layering | <noinclude> | ||
---- | |||
{{Navigation|BSI/200-3|BSI/200-3/Einleitung/Beispiele}} | |||
---- | |||
'''{{BASEPAGENAME}}''' | |||
</noinclude> | |||
== Beschreibung == | |||
; Image layering | |||
Using the docker image history command, you can see the command that was used to create each layer within an image | Using the docker image history command, you can see the command that was used to create each layer within an image | ||
| Zeile 5: | Zeile 14: | ||
Use the docker image history command to see the layers in the getting-started image you created | Use the docker image history command to see the layers in the getting-started image you created | ||
<syntaxhighlight lang="bash" highlight="1" | <syntaxhighlight lang="bash" highlight="1"copy> | ||
docker image history getting-started | docker image history getting-started | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" highlight="" line> | |||
IMAGE CREATED CREATED BY SIZE COMMENT | |||
a78a40cbf866 18 seconds ago /bin/sh -c #(nop) CMD ["node" "src/index.j… 0B | |||
f1d1808565d6 19 seconds ago /bin/sh -c yarn install --production 85.4MB | |||
a2c054d14948 36 seconds ago /bin/sh -c #(nop) COPY dir:5dc710ad87c789593… 198kB | |||
9577ae713121 37 seconds ago /bin/sh -c #(nop) WORKDIR /app 0B | |||
b95baba1cfdb 13 days ago /bin/sh -c #(nop) CMD ["node"] 0B | |||
<missing> 13 days ago /bin/sh -c #(nop) ENTRYPOINT ["docker-entry… 0B | |||
<missing> 13 days ago /bin/sh -c #(nop) COPY file:238737301d473041… 116B | |||
<missing> 13 days ago /bin/sh -c apk add --no-cache --virtual .bui… 5.35MB | |||
<missing> 13 days ago /bin/sh -c #(nop) ENV YARN_VERSION=1.21.1 0B | |||
<missing> 13 days ago /bin/sh -c addgroup -g 1000 node && addu… 74.3MB | |||
<missing> 13 days ago /bin/sh -c #(nop) ENV NODE_VERSION=12.14.1 0B | |||
<missing> 13 days ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B | |||
<missing> 13 days ago /bin/sh -c #(nop) ADD file:e69d441d729412d24… 5.59MB | |||
</syntaxhighlight> | |||
Each of the lines represents a layer in the image | Each of the lines represents a layer in the image | ||
| Zeile 34: | Zeile 44: | ||
docker image history --no-trunc getting-started | docker image history --no-trunc getting-started | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<noinclude> | |||
<!-- | |||
---- | |||
{{Navigation|<zurück>|<nachste>}} | |||
---- | |||
--> | |||
== Anhang == | |||
=== Siehe auch === | |||
<div style="column-count:2"> | |||
<categorytree hideroot=on mode="pages">{{BASEPAGENAME}}</categorytree> | |||
</div> | |||
---- | |||
{{Special:PrefixIndex/{{BASEPAGENAME}}/}} | |||
=== Dokumentation === | |||
<!-- | |||
; Man-Page | |||
# [https://manpages.debian.org/stable/procps/pgrep.1.de.html prep(1)] | |||
; Info-Pages | |||
; Hinweise | |||
<div class="card h-100 bg-warning"> | |||
<div class="card-header">'''<big>Header</big>'''</div> | |||
<div class="card-body bg-white"> | |||
Hier steht der Kartentext | |||
</div> | |||
</div> | |||
--> | |||
=== Links === | |||
==== Projekt ==== | |||
==== Weblinks ==== | |||
[[Kategorie:Docker/Image/Layer]] | [[Kategorie:Docker/Image/Layer]] | ||
</noinclude> | |||
Version vom 29. November 2026, 16:38 Uhr
Docker/Image/02 Layer
Beschreibung
- Image layering
Using the docker image history command, you can see the command that was used to create each layer within an image
Docker image history
Use the docker image history command to see the layers in the getting-started image you created
docker image history getting-started
IMAGE CREATED CREATED BY SIZE COMMENT
a78a40cbf866 18 seconds ago /bin/sh -c #(nop) CMD ["node" "src/index.j… 0B
f1d1808565d6 19 seconds ago /bin/sh -c yarn install --production 85.4MB
a2c054d14948 36 seconds ago /bin/sh -c #(nop) COPY dir:5dc710ad87c789593… 198kB
9577ae713121 37 seconds ago /bin/sh -c #(nop) WORKDIR /app 0B
b95baba1cfdb 13 days ago /bin/sh -c #(nop) CMD ["node"] 0B
<missing> 13 days ago /bin/sh -c #(nop) ENTRYPOINT ["docker-entry… 0B
<missing> 13 days ago /bin/sh -c #(nop) COPY file:238737301d473041… 116B
<missing> 13 days ago /bin/sh -c apk add --no-cache --virtual .bui… 5.35MB
<missing> 13 days ago /bin/sh -c #(nop) ENV YARN_VERSION=1.21.1 0B
<missing> 13 days ago /bin/sh -c addgroup -g 1000 node && addu… 74.3MB
<missing> 13 days ago /bin/sh -c #(nop) ENV NODE_VERSION=12.14.1 0B
<missing> 13 days ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
<missing> 13 days ago /bin/sh -c #(nop) ADD file:e69d441d729412d24… 5.59MB
Each of the lines represents a layer in the image
- The display here shows the base at the bottom with the newest layer at the top
- Using this, you can also quickly see the size of each layer, helping diagnose large images
You'll notice that several of the lines are truncated
- If you add the --no-trunc flag, you'll get the full output
docker image history --no-trunc getting-started
Anhang
Siehe auch
Dokumentation
Links
Projekt
Weblinks