@@ -1369,14 +1369,15 @@ 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. Replace the system
1373- // bundle in this test-only image with the fixture CA without invoking a
1374- // shell: the production supervisor image is deliberately distroless.
1375- // The supervisor retains its compiled Mozilla roots and delivers this
1376- // fixture CA together with the generated sandbox CA to the workload .
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 .
13771377 std:: fs:: write ( & supervisor_dockerfile, format ! (
1378- "FROM {}\n COPY fixture-ca.crt /etc/ssl/certs/ca-certificates.crt\n " ,
1379- 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,
13801381 ) ) . map_err ( |_| "could not write fixture supervisor Dockerfile" ) ?;
13811382 image
13821383 . build ( & dockerfile, & context, "build workload fixture image" )
0 commit comments