Docker Community Forums

Share and learn in the Docker community.

Docker : very slow execution


#1

Hello,
I am beginner on docker, i did a lot of tutorials to discover this great technology. and i have and example to run hello world from debian image:

time sh -c 'i=1; while [ $i -le 5 ]; do docker container run debian echo "Hello from debian i"; i=((i+1)); done'              
Hello from debian 1
Hello from debian 2
Hello from debian 3
Hello from debian 4
Hello from debian 5
real    0m7.558s
user    0m0.092s
sys     0m0.044s

As you can see 7 seconds for that is very solw (the same example cost less than 1 second in other machine) here is my machine configuration where i run this example : OS : Linux Ubuntu 16.04 / CPU : Intel Xeon 3.4 GHz ( No of Cores: 4 (2 logical cores per physical)) and RAM : 12 GB …

I want to understand why its so slow on my machine…

Thanks for your help


(Tekki) #2

It’s ‘slow’ because with every docker container run you boot and shut down a Debian system.