I believe issue 20858 (Ensure empty layers are written to the index file), which was closed as fixed in RC1, is still happening. I update my boot version to RC1 for a project that does not use any snapshots and am still getting an unpacked directory that is missing the snapshots folder, hence the following Dockerfile excerpt fails saying the folder does not exist:

ARG DEPENDENCY=/app/target/dependency
COPY --from=build ${DEPENDENCY}/dependencies/ .
COPY --from=build ${DEPENDENCY}/spring-boot-loader/ .
COPY --from=build ${DEPENDENCY}/snapshot-dependencies/ .   # <---- fails here
COPY --from=build ${DEPENDENCY}/application/ .

From my pom.xml:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.0.RC1</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

I even tried specifying the version under the maven plugin as well.

Comment From: wilkinsona

Thanks for the report, @ciberkleid. With the fix for #20858, the empty layer is written into the index file, however we missed the other half of the problem which is making sure that it's read back out again. IndexedLayers currently does not do that, accidentally ignoring any layer that has no content.