Commit 9b0758c2 authored by Luke Patterson's avatar Luke Patterson

$ docker build --tag layers-blog:step-1-change-dependencies-release-layer .

...
Step 9/24 : WORKDIR ./layers-blog-snapshot-dependency/
 ---> 2a285b6ceb7c
Step 10/24 : COPY ./layers-blog-snapshot-dependency/ ./
 ---> 9c1c6813df36
Step 11/24 : RUN mvn install --quiet --update-snapshots --strict-checksums --batch-mode
 ---> e320be9dd7bb
Step 12/24 : WORKDIR ../layers-blog-app/
 ---> 720d9b384816
Step 13/24 : COPY layers-blog-app ./
 ---> ab4948f33415
Step 14/24 : RUN mvn package --quiet --update-snapshots --strict-checksums --batch-mode
 ---> fb7cdb80ff04
Step 15/24 : WORKDIR ./target/
 ---> fbc83f1d0bad
Step 16/24 : RUN unzip -q *.jar -d ./unzipped/     && tree ./unzipped/     && mkdir --parents /layers/3-app/BOOT-INF/     && mv ./unzipped/BOOT-INF/classes/ /layers/3-app/BOOT-INF/     && mv ./unzipped/META-INF/ /layers/3-app/     && mkdir --parents /layers/2-dependencies-snapshot/BOOT-INF/lib/     && find ./unzipped/BOOT-INF/lib/ -type f -name '*-SNAPSHOT.jar' -exec mv {} /layers/2-dependencies-snapshot/BOOT-INF/lib/ ';'     && mv ./unzipped/ /layers/1-dependencies-release/     && tree /layers/
./unzipped/
├── BOOT-INF
│   ├── classes
│   │   ├── application.properties
│   │   └── org
│   │       └── lukewpatterson
│   │           └── layers
│   │               └── blog
│   │                   └── app
│   │                       └── OurSpringBootApplication.class
│   └── lib
│       ├── classmate-1.3.4.jar
│       ├── gson-2.8.5.jar
│       ├── hibernate-validator-6.0.12.Final.jar
│       ├── jackson-annotations-2.9.0.jar
│       ├── jackson-core-2.9.6.jar
│       ├── jackson-databind-2.9.6.jar
│       ├── jackson-datatype-jdk8-2.9.6.jar
│       ├── jackson-datatype-jsr310-2.9.6.jar
│       ├── jackson-module-parameter-names-2.9.6.jar
│       ├── javax.annotation-api-1.3.2.jar
│       ├── jboss-logging-3.3.2.Final.jar
│       ├── jul-to-slf4j-1.7.25.jar
│       ├── layers-blog-snapshot-dependency-1-SNAPSHOT.jar
│       ├── log4j-api-2.10.0.jar
│       ├── log4j-to-slf4j-2.10.0.jar
│       ├── logback-classic-1.2.3.jar
│       ├── logback-core-1.2.3.jar
│       ├── slf4j-api-1.7.25.jar
│       ├── snakeyaml-1.19.jar
│       ├── spring-aop-5.0.9.RELEASE.jar
│       ├── spring-beans-5.0.9.RELEASE.jar
│       ├── spring-boot-2.0.5.RELEASE.jar
│       ├── spring-boot-autoconfigure-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-json-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-logging-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-tomcat-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-web-2.0.5.RELEASE.jar
│       ├── spring-context-5.0.9.RELEASE.jar
│       ├── spring-core-5.0.9.RELEASE.jar
│       ├── spring-expression-5.0.9.RELEASE.jar
│       ├── spring-jcl-5.0.9.RELEASE.jar
│       ├── spring-web-5.0.9.RELEASE.jar
│       ├── spring-webmvc-5.0.9.RELEASE.jar
│       ├── tomcat-embed-core-8.5.34.jar
│       ├── tomcat-embed-el-8.5.34.jar
│       ├── tomcat-embed-websocket-8.5.34.jar
│       └── validation-api-2.0.1.Final.jar
├── META-INF
│   ├── MANIFEST.MF
│   └── maven
│       └── org.lukewpatterson
│           └── layers-blog-app
│               ├── pom.properties
│               └── pom.xml
└── org
    └── springframework
        └── boot
            └── loader
                ├── ExecutableArchiveLauncher.class
                ├── JarLauncher.class
                ├── LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.class
                ├── LaunchedURLClassLoader.class
                ├── Launcher.class
                ├── MainMethodRunner.class
                ├── PropertiesLauncher$1.class
                ├── PropertiesLauncher$ArchiveEntryFilter.class
                ├── PropertiesLauncher$PrefixMatchingArchiveFilter.class
                ├── PropertiesLauncher.class
                ├── WarLauncher.class
                ├── archive
                │   ├── Archive$Entry.class
                │   ├── Archive$EntryFilter.class
                │   ├── Archive.class
                │   ├── ExplodedArchive$1.class
                │   ├── ExplodedArchive$FileEntry.class
                │   ├── ExplodedArchive$FileEntryIterator$EntryComparator.class
                │   ├── ExplodedArchive$FileEntryIterator.class
                │   ├── ExplodedArchive.class
                │   ├── JarFileArchive$EntryIterator.class
                │   ├── JarFileArchive$JarFileEntry.class
                │   └── JarFileArchive.class
                ├── data
                │   ├── RandomAccessData.class
                │   ├── RandomAccessDataFile$1.class
                │   ├── RandomAccessDataFile$DataInputStream.class
                │   ├── RandomAccessDataFile$FileAccess.class
                │   └── RandomAccessDataFile.class
                ├── jar
                │   ├── AsciiBytes.class
                │   ├── Bytes.class
                │   ├── CentralDirectoryEndRecord.class
                │   ├── CentralDirectoryFileHeader.class
                │   ├── CentralDirectoryParser.class
                │   ├── CentralDirectoryVisitor.class
                │   ├── FileHeader.class
                │   ├── Handler.class
                │   ├── JarEntry.class
                │   ├── JarEntryFilter.class
                │   ├── JarFile$1.class
                │   ├── JarFile$2.class
                │   ├── JarFile$JarFileType.class
                │   ├── JarFile.class
                │   ├── JarFileEntries$1.class
                │   ├── JarFileEntries$EntryIterator.class
                │   ├── JarFileEntries.class
                │   ├── JarURLConnection$1.class
                │   ├── JarURLConnection$JarEntryName.class
                │   ├── JarURLConnection.class
                │   ├── StringSequence.class
                │   └── ZipInflaterInputStream.class
                └── util
                    └── SystemPropertyUtils.class

20 directories, 93 files
/layers/
├── 1-dependencies-release
│   ├── BOOT-INF
│   │   └── lib
│   │       ├── classmate-1.3.4.jar
│   │       ├── gson-2.8.5.jar
│   │       ├── hibernate-validator-6.0.12.Final.jar
│   │       ├── jackson-annotations-2.9.0.jar
│   │       ├── jackson-core-2.9.6.jar
│   │       ├── jackson-databind-2.9.6.jar
│   │       ├── jackson-datatype-jdk8-2.9.6.jar
│   │       ├── jackson-datatype-jsr310-2.9.6.jar
│   │       ├── jackson-module-parameter-names-2.9.6.jar
│   │       ├── javax.annotation-api-1.3.2.jar
│   │       ├── jboss-logging-3.3.2.Final.jar
│   │       ├── jul-to-slf4j-1.7.25.jar
│   │       ├── log4j-api-2.10.0.jar
│   │       ├── log4j-to-slf4j-2.10.0.jar
│   │       ├── logback-classic-1.2.3.jar
│   │       ├── logback-core-1.2.3.jar
│   │       ├── slf4j-api-1.7.25.jar
│   │       ├── snakeyaml-1.19.jar
│   │       ├── spring-aop-5.0.9.RELEASE.jar
│   │       ├── spring-beans-5.0.9.RELEASE.jar
│   │       ├── spring-boot-2.0.5.RELEASE.jar
│   │       ├── spring-boot-autoconfigure-2.0.5.RELEASE.jar
│   │       ├── spring-boot-starter-2.0.5.RELEASE.jar
│   │       ├── spring-boot-starter-json-2.0.5.RELEASE.jar
│   │       ├── spring-boot-starter-logging-2.0.5.RELEASE.jar
│   │       ├── spring-boot-starter-tomcat-2.0.5.RELEASE.jar
│   │       ├── spring-boot-starter-web-2.0.5.RELEASE.jar
│   │       ├── spring-context-5.0.9.RELEASE.jar
│   │       ├── spring-core-5.0.9.RELEASE.jar
│   │       ├── spring-expression-5.0.9.RELEASE.jar
│   │       ├── spring-jcl-5.0.9.RELEASE.jar
│   │       ├── spring-web-5.0.9.RELEASE.jar
│   │       ├── spring-webmvc-5.0.9.RELEASE.jar
│   │       ├── tomcat-embed-core-8.5.34.jar
│   │       ├── tomcat-embed-el-8.5.34.jar
│   │       ├── tomcat-embed-websocket-8.5.34.jar
│   │       └── validation-api-2.0.1.Final.jar
│   └── org
│       └── springframework
│           └── boot
│               └── loader
│                   ├── ExecutableArchiveLauncher.class
│                   ├── JarLauncher.class
│                   ├── LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.class
│                   ├── LaunchedURLClassLoader.class
│                   ├── Launcher.class
│                   ├── MainMethodRunner.class
│                   ├── PropertiesLauncher$1.class
│                   ├── PropertiesLauncher$ArchiveEntryFilter.class
│                   ├── PropertiesLauncher$PrefixMatchingArchiveFilter.class
│                   ├── PropertiesLauncher.class
│                   ├── WarLauncher.class
│                   ├── archive
│                   │   ├── Archive$Entry.class
│                   │   ├── Archive$EntryFilter.class
│                   │   ├── Archive.class
│                   │   ├── ExplodedArchive$1.class
│                   │   ├── ExplodedArchive$FileEntry.class
│                   │   ├── ExplodedArchive$FileEntryIterator$EntryComparator.class
│                   │   ├── ExplodedArchive$FileEntryIterator.class
│                   │   ├── ExplodedArchive.class
│                   │   ├── JarFileArchive$EntryIterator.class
│                   │   ├── JarFileArchive$JarFileEntry.class
│                   │   └── JarFileArchive.class
│                   ├── data
│                   │��  ├── RandomAccessData.class
│                   │   ├── RandomAccessDataFile$1.class
│                   │   ├── RandomAccessDataFile$DataInputStream.class
│                   │   ├── RandomAccessDataFile$FileAccess.class
│                   │   └── RandomAccessDataFile.class
│                   ├── jar
│                   │   ├── AsciiBytes.class
│                   │   ├── Bytes.class
│                   │   ├── CentralDirectoryEndRecord.class
│                   │   ├── CentralDirectoryFileHeader.class
│                   │   ├── CentralDirectoryParser.class
│                   │   ├── CentralDirectoryVisitor.class
│                   │   ├── FileHeader.class
│                   │   ├── Handler.class
│                   │   ├── JarEntry.class
│                   │   ├── JarEntryFilter.class
│                   │   ├── JarFile$1.class
│                   │   ├── JarFile$2.class
│                   │   ├── JarFile$JarFileType.class
│                   │   ├── JarFile.class
│                   │   ├── JarFileEntries$1.class
│                   │   ├── JarFileEntries$EntryIterator.class
│                   │   ├── JarFileEntries.class
│                   │   ├── JarURLConnection$1.class
│                   │   ├── JarURLConnection$JarEntryName.class
│                   │   ├── JarURLConnection.class
│                   │   ├── StringSequence.class
│                   │   └── ZipInflaterInputStream.class
│                   └── util
│                       └── SystemPropertyUtils.class
├── 2-dependencies-snapshot
│   └── BOOT-INF
│       └── lib
│           └── layers-blog-snapshot-dependency-1-SNAPSHOT.jar
└── 3-app
    ├── BOOT-INF
    │   └── classes
    │       ├── application.properties
    │       └── org
    │           └── lukewpatterson
    │               └── layers
    │                   └── blog
    │                       └── app
    │                           └── OurSpringBootApplication.class
    └── META-INF
        ├── MANIFEST.MF
        └── maven
            └── org.lukewpatterson
                └── layers-blog-app
                    ├── pom.properties
                    └── pom.xml

26 directories, 93 files

...
Step 19/24 : WORKDIR /app/
 ---> Using cache
 ---> e83ac4cda8f7
Step 20/24 : COPY --from=build /layers/1-dependencies-release/ ./
 ---> a5f34ee04615
Step 21/24 : COPY --from=build /layers/2-dependencies-snapshot/ ./
 ---> cd906d9b4640
Step 22/24 : COPY --from=build /layers/3-app/ ./
 ---> 001ca1ae72d4
Step 23/24 : RUN tree
.
├── BOOT-INF
│   ├── classes
│   │   ├── application.properties
│   │   └── org
│   │       └── lukewpatterson
│   │           └── layers
│   │               └── blog
│   │                   └── app
│   │                       └── OurSpringBootApplication.class
│   └── lib
│       ├── classmate-1.3.4.jar
│       ├── gson-2.8.5.jar
│       ├── hibernate-validator-6.0.12.Final.jar
│       ├── jackson-annotations-2.9.0.jar
│       ├── jackson-core-2.9.6.jar
│       ├── jackson-databind-2.9.6.jar
│       ├── jackson-datatype-jdk8-2.9.6.jar
│       ├── jackson-datatype-jsr310-2.9.6.jar
│       ├── jackson-module-parameter-names-2.9.6.jar
│       ├── javax.annotation-api-1.3.2.jar
│       ├── jboss-logging-3.3.2.Final.jar
│       ├── jul-to-slf4j-1.7.25.jar
│       ├── layers-blog-snapshot-dependency-1-SNAPSHOT.jar
│       ├── log4j-api-2.10.0.jar
│       ├── log4j-to-slf4j-2.10.0.jar
│       ├── logback-classic-1.2.3.jar
│       ├── logback-core-1.2.3.jar
│       ├── slf4j-api-1.7.25.jar
│       ├── snakeyaml-1.19.jar
│       ├── spring-aop-5.0.9.RELEASE.jar
│       ├── spring-beans-5.0.9.RELEASE.jar
│       ├── spring-boot-2.0.5.RELEASE.jar
│       ├── spring-boot-autoconfigure-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-json-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-logging-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-tomcat-2.0.5.RELEASE.jar
│       ├── spring-boot-starter-web-2.0.5.RELEASE.jar
│       ├── spring-context-5.0.9.RELEASE.jar
│       ├── spring-core-5.0.9.RELEASE.jar
│       ├── spring-expression-5.0.9.RELEASE.jar
│       ├── spring-jcl-5.0.9.RELEASE.jar
│       ├── spring-web-5.0.9.RELEASE.jar
│       ├── spring-webmvc-5.0.9.RELEASE.jar
│       ├── tomcat-embed-core-8.5.34.jar
│       ├── tomcat-embed-el-8.5.34.jar
│       ├── tomcat-embed-websocket-8.5.34.jar
│       └── validation-api-2.0.1.Final.jar
├── META-INF
│   ├── MANIFEST.MF
│   └── maven
│       └── org.lukewpatterson
│           └── layers-blog-app
│               ├── pom.properties
│               └── pom.xml
└── org
    └── springframework
        └── boot
            └── loader
                ├── ExecutableArchiveLauncher.class
                ├── JarLauncher.class
                ├── LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.class
                ├── LaunchedURLClassLoader.class
                ├── Launcher.class
                ├── MainMethodRunner.class
                ├── PropertiesLauncher$1.class
                ├── PropertiesLauncher$ArchiveEntryFilter.class
                ├── PropertiesLauncher$PrefixMatchingArchiveFilter.class
                ├── PropertiesLauncher.class
                ├── WarLauncher.class
                ├── archive
                │   ├── Archive$Entry.class
                │   ├── Archive$EntryFilter.class
                │   ├── Archive.class
                │   ├── ExplodedArchive$1.class
                │   ├── ExplodedArchive$FileEntry.class
                │   ├── ExplodedArchive$FileEntryIterator$EntryComparator.class
                │   ├── ExplodedArchive$FileEntryIterator.class
                │   ├── ExplodedArchive.class
                │   ├── JarFileArchive$EntryIterator.class
                │   ├── JarFileArchive$JarFileEntry.class
                │   └── JarFileArchive.class
                ├── data
                │   ├── RandomAccessData.class
                │   ├── RandomAccessDataFile$1.class
                │   ├── RandomAccessDataFile$DataInputStream.class
                │   ├── RandomAccessDataFile$FileAccess.class
                │   └── RandomAccessDataFile.class
                ├── jar
                │   ├── AsciiBytes.class
                │   ├── Bytes.class
                │   ├── CentralDirectoryEndRecord.class
                │   ├── CentralDirectoryFileHeader.class
                │   ├── CentralDirectoryParser.class
                │   ├── CentralDirectoryVisitor.class
                │   ├── FileHeader.class
                │   ├── Handler.class
                │   ├── JarEntry.class
                │   ├── JarEntryFilter.class
                │   ├── JarFile$1.class
                │   ├── JarFile$2.class
                │   ├── JarFile$JarFileType.class
                │   ├── JarFile.class
                │   ├── JarFileEntries$1.class
                │   ├── JarFileEntries$EntryIterator.class
                │   ├── JarFileEntries.class
                │   ├── JarURLConnection$1.class
                │   ├── JarURLConnection$JarEntryName.class
                │   ├── JarURLConnection.class
                │   ├── StringSequence.class
                │   └── ZipInflaterInputStream.class
                └── util
                    └── SystemPropertyUtils.class

20 directories, 93 files
 ---> 14940d217b00
Step 24/24 : CMD ["java", "org.springframework.boot.loader.JarLauncher"]
 ---> dfd4920a5fe7
Successfully built dfd4920a5fe7
Successfully tagged layers-blog:step-1-change-dependencies-release-layer

--------------------------------------------------------------------------------------------------------------
$ container-diff diff daemon://layers-blog:step-0-initial-build daemon://layers-blog:step-1-change-dependencies-release-layer --type=size --type=file

-----File-----

These entries have been added to layers-blog:step-0-initial-build:
FILE                                    SIZE
/app/BOOT-INF/lib/gson-2.8.5.jar        236K

These entries have been deleted from layers-blog:step-0-initial-build: None

These entries have been changed between layers-blog:step-0-initial-build and layers-blog:step-1-change-dependencies-release-layer:
FILE                                                                  SIZE1        SIZE2
/app/META-INF/maven/org.lukewpatterson/layers-blog-app/pom.xml        1.3K         1.4K

-----Size-----

Image size difference between layers-blog:step-0-initial-build and layers-blog:step-1-change-dependencies-release-layer:
SIZE1         SIZE2
114.7M        115M
parent b663ee20
......@@ -24,6 +24,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>
<build>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment