dockerdocker-in-docker

Docker in Docker - How do I start a docker container without outputting console logs from child container


I have the following problem regarding console output from Docker Containers

I have built a C# console app, it lives inside a docker image that I have always running (Main Docker Container). I have mounted the docker socket to allow the container to talk to the host docker engine.

When requested the app will spawn containers of itself (Child Docker Container) that do "work".

However the Main Docker Container is logging everything from the console output for all Child Docker Containers.

Is there any way that the Main Docker Container can start Child Docker Containers without console output from Child Docker Containers being printed in the Main Docker Container?

Docker Logs

Here is the C# I use to start the Child Docker Container

C# Start up Code


Solution

  • I figured out the answer - it was as simple as calling proc.CancelOutputRead();

    enter image description here