@@ -46,7 +46,7 @@ void dockerLikeMinimal(final String runtime) {
4646 assertCommandLine (
4747 List .of (),
4848 List .of (),
49- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
49+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
5050 List .of ());
5151 }
5252
@@ -59,7 +59,7 @@ void dockerLikeWithPull(final String runtime) {
5959 assertCommandLine (
6060 List .of (tool , "pull" , options .image ),
6161 List .of (),
62- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
62+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
6363 List .of ());
6464 }
6565
@@ -72,7 +72,7 @@ void dockerLikeWithBuild(final String runtime) {
7272 assertCommandLine (
7373 List .of (),
7474 List .of (tool , "build" , "--file" , options .containerfile , "--tag" , options .image ),
75- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
75+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
7676 List .of ());
7777 }
7878
@@ -85,7 +85,7 @@ void dockerLikeWithCleanup(final String runtime) {
8585 assertCommandLine (
8686 List .of (),
8787 List .of (),
88- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
88+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
8989 List .of (tool , "rmi" , options .image ));
9090 }
9191
@@ -101,7 +101,7 @@ void dockerLikeWithDefaults(final String runtime, final SystemProperties propert
101101 assertCommandLine (
102102 List .of (),
103103 List .of (),
104- List .of (tool , "run" , "--rm" , "--volume" , "/some/folder:/some/folder:z" , "--workdir" , "/some/folder" , "--interactive" , "--tty" , options .image ),
104+ List .of (tool , "run" , "--rm" , "--volume" , "/some/folder:/some/folder:z" , "--workdir" , "/some/folder" , "--interactive" , "--tty" , "--env" , "ILO_CONTAINER=true" , options .image ),
105105 List .of ());
106106 }
107107
@@ -114,7 +114,7 @@ void dockerLikeWithRuntimeOption(final String runtime) {
114114 assertCommandLine (
115115 List .of (),
116116 List .of (),
117- List .of (tool , "--remote" , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
117+ List .of (tool , "--remote" , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
118118 List .of ());
119119 }
120120
@@ -128,7 +128,7 @@ void dockerLikeWithRuntimePullOption(final String runtime) {
128128 assertCommandLine (
129129 List .of (tool , "pull" , "--all-tags" , options .image ),
130130 List .of (),
131- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
131+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
132132 List .of ());
133133 }
134134
@@ -142,7 +142,7 @@ void dockerLikeWithRuntimeBuildOption(final String runtime) {
142142 assertCommandLine (
143143 List .of (),
144144 List .of (tool , "build" , "--file" , options .containerfile , "--squash-all" , "--tag" , options .image ),
145- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
145+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
146146 List .of ());
147147 }
148148
@@ -155,7 +155,7 @@ void dockerLikeWithRuntimeRunOption(final String runtime) {
155155 assertCommandLine (
156156 List .of (),
157157 List .of (),
158- List .of (tool , "run" , "--rm" , "--quiet" , "--workdir" , options .workingDir , options .image ),
158+ List .of (tool , "run" , "--rm" , "--quiet" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
159159 List .of ());
160160 }
161161
@@ -169,7 +169,7 @@ void dockerLikeWithRuntimeCleanupOption(final String runtime) {
169169 assertCommandLine (
170170 List .of (),
171171 List .of (),
172- List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ),
172+ List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ),
173173 List .of (tool , "rmi" , "--force" , options .image ));
174174 }
175175
@@ -216,7 +216,7 @@ void failToRun(final String runtime) {
216216 () -> assertEquals (1 , exitCode , "exitCode" ),
217217 () -> assertIterableEquals (List .of (), executor .pullArguments (), "pullArguments" ),
218218 () -> assertIterableEquals (List .of (), executor .buildArguments (), "buildArguments" ),
219- () -> assertIterableEquals (List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ), executor .runArguments (), "runArguments" ),
219+ () -> assertIterableEquals (List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ), executor .runArguments (), "runArguments" ),
220220 () -> noExecution (executor ::cleanupArguments , "cleanupArguments" ));
221221 }
222222
@@ -231,7 +231,7 @@ void failToClean(final String runtime) {
231231 () -> assertEquals (1 , exitCode , "exitCode" ),
232232 () -> assertIterableEquals (List .of (), executor .pullArguments (), "pullArguments" ),
233233 () -> assertIterableEquals (List .of (), executor .buildArguments (), "buildArguments" ),
234- () -> assertIterableEquals (List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , options .image ), executor .runArguments (), "runArguments" ),
234+ () -> assertIterableEquals (List .of (tool , "run" , "--rm" , "--workdir" , options .workingDir , "--env" , "ILO_CONTAINER=true" , options .image ), executor .runArguments (), "runArguments" ),
235235 () -> assertIterableEquals (List .of (), executor .cleanupArguments (), "cleanupArguments" ));
236236 }
237237
0 commit comments