@@ -186,14 +186,14 @@ impl FixtureImage {
186186 & self . tag
187187 }
188188
189- async fn build ( & self , dockerfile : & Path , context : & Path ) -> Result < ( ) , String > {
189+ async fn build ( & self , dockerfile : & Path , context : & Path , label : & str ) -> Result < ( ) , String > {
190190 let mut command = Command :: from ( self . engine . command ( ) ) ;
191191 command
192192 . args ( [ "build" , "--file" ] )
193193 . arg ( dockerfile)
194194 . args ( [ "--tag" , & self . tag ] )
195195 . arg ( context) ;
196- checked_command_with_timeout ( & mut command, "build fixture image" , IMAGE_BUILD_TIMEOUT )
196+ checked_command_with_timeout ( & mut command, label , IMAGE_BUILD_TIMEOUT )
197197 . await
198198 . map ( |_| ( ) )
199199 }
@@ -1369,16 +1369,26 @@ async fn acknowledged_provider_changes_apply_to_fresh_clients_and_revoke_retaine
13691369 "FROM {base}\n USER root\n COPY client.py /opt/provider-readiness-client.py\n USER sandbox\n "
13701370 ) ) . map_err ( |_| "could not write fixture Dockerfile" ) ?;
13711371 let supervisor_dockerfile = context. join ( "Dockerfile.supervisor" ) ;
1372- // Outbound TLS belongs to the separate supervisor. Its combined public
1373- // trust bundle is delivered to the workload through the sandbox protocol.
1374- // Preserve the base image's user setting: Docker's archive upload applies
1375- // an explicit image user to the supervisor's private bootstrap files.
1372+ // Outbound TLS belongs to the separate supervisor. Assemble its combined
1373+ // public trust bundle in the shell-capable workload image because the
1374+ // final supervisor image is intentionally distroless. Preserve the final
1375+ // image's user setting: Docker's archive upload applies an explicit image
1376+ // user to the supervisor's private bootstrap files.
13761377 std:: fs:: write ( & supervisor_dockerfile, format ! (
1377- "FROM {}\n COPY fixture-ca.crt /tmp/readiness-fixture-ca.crt\n RUN cat /tmp/readiness-fixture-ca.crt >> /etc/ssl/certs/ca-certificates.crt && rm /tmp/readiness-fixture-ca.crt\n " ,
1378- gateway_config. supervisor_image
1378+ "FROM {} AS supervisor\n FROM {base} AS trust-bundle\n USER 0\n COPY --from=supervisor /etc/ssl/certs/ca-certificates.crt /tmp/ca-certificates.crt\n COPY fixture-ca.crt /tmp/readiness-fixture-ca.crt\n RUN [\" /usr/bin/python3\" , \" -c\" , \" from pathlib import Path; bundle = Path('/tmp/ca-certificates.crt'); bundle.write_bytes(bundle.read_bytes() + Path('/tmp/readiness-fixture-ca.crt').read_bytes())\" ]\n FROM {}\n COPY --from=trust-bundle /tmp/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt\n " ,
1379+ gateway_config. supervisor_image,
1380+ gateway_config. supervisor_image,
13791381 ) ) . map_err ( |_| "could not write fixture supervisor Dockerfile" ) ?;
1380- image. build ( & dockerfile, & context) . await ?;
1381- supervisor_image. build ( & supervisor_dockerfile, & context) . await ?;
1382+ image
1383+ . build ( & dockerfile, & context, "build workload fixture image" )
1384+ . await ?;
1385+ supervisor_image
1386+ . build (
1387+ & supervisor_dockerfile,
1388+ & context,
1389+ "build supervisor fixture image" ,
1390+ )
1391+ . await ?;
13821392 gateway_config. apply ( supervisor_image. tag ( ) ) . await ?;
13831393 let profile = directory. path ( ) . join ( "profile.json" ) ;
13841394 let policy = directory. path ( ) . join ( "policy.json" ) ;
0 commit comments