RUN
– GeschwindigkeitDurch viele RUN
Befehle wird der Docker-Container unnötig langsam
time docker build --no-cache # 20,359 s
time docker build --no-cache # 2,346 s
RUN
– Größeund Größer
docker image history fast
IMAGE CREATED CREATED BY SIZE
2f4909694335 2 minutes ago /bin/sh -c echo 1 > /tmp/writefile.txt &&... 3B
4a415e366388 2 minutes ago /bin/sh -c #(nop) ADD file:730030a984f5f0c... 3.98MB
docker image history slow
IMAGE CREATED CREATED BY SIZE
c67532402b3c 2 minutes ago /bin/sh -c echo 10 > /tmp/writefile.txt 3B
bb0a68e253b3 2 minutes ago /bin/sh -c echo 9 > /tmp/writefile.txt 2B
0a5be9a5c8c4 2 minutes ago /bin/sh -c echo 8 > /tmp/writefile.txt 2B
7f07d727ec78 2 minutes ago /bin/sh -c echo 7 > /tmp/writefile.txt 2B
894e747bb8b6 2 minutes ago /bin/sh -c echo 6 > /tmp/writefile.txt 2B
ade3a525f5b2 2 minutes ago /bin/sh -c echo 5 > /tmp/writefile.txt 2B
c200ffcc97a7 2 minutes ago /bin/sh -c echo 4 > /tmp/writefile.txt 2B
162c5645a39b 2 minutes ago /bin/sh -c echo 3 > /tmp/writefile.txt 2B
b270a19c71ae 2 minutes ago /bin/sh -c echo 2 > /tmp/writefile.txt 2B
d0f84d3a3225 2 minutes ago /bin/sh -c echo 1 > /tmp/writefile.txt 2B
4a415e366388 2 minutes ago /bin/sh -c #(nop) ADD file:730030a984f5f0c... 3.98MB
FROM debian:latest
RUN apt-get update
RUN apt-get install curl
# Versionsnummern der Container angeben
docker run --rm custombuild:1 phpunit
docker run --rm custombuild:2 phpunti
docker run --rm custombuild:latest phpunit