Problem
#597 / #675 / #676 fix the native launcher so that when it exits prematurely (e.g. a fixed gateway port is already taken) the user sees the actual cause instead of just exited prematurely with status 101.
The Docker launcher path has the identical bug and is untouched. When network start runs the launcher in a container — always on Windows, and on unix with autocontainerize=true or a docker-mode network — it goes through spawn_docker_launcher, not spawn_network_launcher. On premature exit it returns ContainerExitedPrematurely with only the exit status, and never surfaces the container's output — even though it attaches stdout/stderr (attach_stdout/attach_stderr: Some(true)).
Suggested fix
In the premature-exit arm of the select! in spawn_docker_launcher (mirroring premature_exit_detail from the native path), fetch the container log tail via bollard's logs() API and fold it into ContainerExitedPrematurely. Note this is a different mechanism from the native fix (no local stderr.log file; the daemon owns the stdio), so it does not reuse premature_exit_detail.
Notes
Discovered while reviewing #675 and implementing #676.
Problem
#597 / #675 / #676 fix the native launcher so that when it exits prematurely (e.g. a fixed gateway port is already taken) the user sees the actual cause instead of just
exited prematurely with status 101.The Docker launcher path has the identical bug and is untouched. When
network startruns the launcher in a container — always on Windows, and on unix withautocontainerize=trueor a docker-mode network — it goes throughspawn_docker_launcher, notspawn_network_launcher. On premature exit it returnsContainerExitedPrematurelywith only the exit status, and never surfaces the container's output — even though it attaches stdout/stderr (attach_stdout/attach_stderr: Some(true)).Suggested fix
In the premature-exit arm of the
select!inspawn_docker_launcher(mirroringpremature_exit_detailfrom the native path), fetch the container log tail via bollard'slogs()API and fold it intoContainerExitedPrematurely. Note this is a different mechanism from the native fix (no localstderr.logfile; the daemon owns the stdio), so it does not reusepremature_exit_detail.Notes
Discovered while reviewing #675 and implementing #676.