Commit c3e137b7 authored by Luke Patterson's avatar Luke Patterson

$ docker build --tag layers-blog:step-2-change-dependencies-snapshot-layer .

...
Step 9/24 : WORKDIR ./layers-blog-snapshot-dependency/
 ---> Using cache
 ---> 2a285b6ceb7c
Step 10/24 : COPY ./layers-blog-snapshot-dependency/ ./
 ---> 54757dae4545
Step 11/24 : RUN mvn install --quiet --update-snapshots --strict-checksums --batch-mode
 ---> 2743ddf8ee9b
Step 12/24 : WORKDIR ../layers-blog-app/
 ---> 5c31fb7b9ddd
Step 13/24 : COPY layers-blog-app ./
 ---> 4facffd4d96f
Step 14/24 : RUN mvn package --quiet --update-snapshots --strict-checksums --batch-mode
 ---> c090d20a7b9e
Step 15/24 : WORKDIR ./target/
 ---> 8017d67e823c
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/ ./
 ---> Using cache
 ---> a5f34ee04615
Step 21/24 : COPY --from=build /layers/2-dependencies-snapshot/ ./
 ---> 7446b0325602
Step 22/24 : COPY --from=build /layers/3-app/ ./
 ---> 6b0cd535260f
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
Removing intermediate container 4f1daefbd4fb
 ---> aeae90ebed6f
Step 24/24 : CMD ["java", "org.springframework.boot.loader.JarLauncher"]
 ---> 1fa3d13f15a9
Successfully built 1fa3d13f15a9
Successfully tagged layers-blog:step-2-change-dependencies-snapshot-layer

--------------------------------------------------------------------------------------------------------------
$ container-diff diff daemon://layers-blog:step-1-change-dependencies-release-layer daemon://layers-blog:step-2-change-dependencies-snapshot-layer --type=size --type=file

-----File-----

These entries have been added to layers-blog:step-1-change-dependencies-release-layer: None

These entries have been deleted from layers-blog:step-1-change-dependencies-release-layer: None

These entries have been changed between layers-blog:step-1-change-dependencies-release-layer and layers-blog:step-2-change-dependencies-snapshot-layer:
FILE                                                                    SIZE1        SIZE2
/app/BOOT-INF/lib/layers-blog-snapshot-dependency-1-SNAPSHOT.jar        2.8K         2.8K

-----Size-----

Image size difference between layers-blog:step-1-change-dependencies-release-layer and layers-blog:step-2-change-dependencies-snapshot-layer:
SIZE1        SIZE2
115M         115M
parent 9b0758c2
......@@ -2,6 +2,6 @@ package org.lukewpatterson.layers.blog.snapshot.dependency;
public class ClassFromSnapshotDependency {
public static String SOME_VALUE = "snapshot-rev-1";
public static String SOME_VALUE = "snapshot-rev-2";
}
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