Skip to content

Commit 3d19418

Browse files
committed
Sort to keep correct order
1 parent 42061b2 commit 3d19418

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

testcontainers-advanced-imagebuilder/src/main/java/software/xdev/testcontainers/imagebuilder/compat/DockerfileCOPYParentsEmulator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ protected Stream<String> handleLine(final String line, final Set<String> relativ
9595
final GlobMatcher matcher = new GlobMatcher(source);
9696
return relativeFiles.stream()
9797
.filter(matcher::matches)
98+
.sorted()
9899
.map(s -> Map.entry(s, targetPathFinalForRelative + s));
99100
})
100101
.map(e -> lineBeforeArgs + " " + e.getKey()

testcontainers-advanced-imagebuilder/src/test/java/software/xdev/testcontainers/imagebuilder/compat/DockerfileCOPYParentsEmulatorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ void simpleCheck()
5151
"FROM alpine:3",
5252
"COPY mvnw --abc ./",
5353
"COPY .mvn/wrapper/maven-wrapper.properties --abc ./.mvn/wrapper/maven-wrapper.properties",
54+
"COPY a/b/c/pom.xml ./a/b/c/pom.xml",
5455
"COPY a/b/pom.xml ./a/b/pom.xml",
5556
"COPY a/pom.xml ./a/pom.xml",
56-
"COPY a/b/c/pom.xml ./a/b/c/pom.xml",
5757
"COPY pom.xml ./pom.xml",
5858
"COPY abc/def.txt ./abc/def.txt"
5959
),

0 commit comments

Comments
 (0)