Docker Community Forums

Share and learn in the Docker community.

Slow network when running docker container on azure devops agent


I’m currently trying to learn docker and have started by moving our integration tests into a container. It don’t do alot but simple move the dlls to a container:


RUN apt-get update && apt-get install -y libgdiplus

COPY ./Tests .

# run tests on docker run
ENTRYPOINT ["dotnet", "test", "Test.dll", "--logger", "trx", "--results-directory", "TestResult", "--filter"]

I have also created a docker compose file:

version: "3.4"


    image: urlToImage
    container_name: test
    command: "${filter} --verbosity n"
      - testEnvironment=${testEnvironment}      
      - TZ=Europe/Stockholm 

So I can now run this docker container from azure devops (on an ubuntu agent) but the problem is that all network calls are really slow. The run time between in and outside docker is currently 10-15 min and it seems to be because all the network calls take 2-3 seconds more to perform.

Is there some way to fix this? I have tried to add network_mode: host but it doesn’t seems to make any difference. So I feel that I currently don’t have enough experience with docker to say why the difference are that big.