Reputation: 1548
I provisioned an instance from Amazon Machine Image based on Amazon Linux (amzn-ami-2016.03.c-amazon-ecs-optimized). While attempting to do a docker build
for my project, I find the process extremely slow, even for simple tasks like setting environment variables ENV TEST_PORT=3000
etc. A build that takes less than 5 minutes on my local machine has been running for at least an hour.
Running docker info
returns Storage as devicemapper
and this article suggests switching to aufs
but it is for Ubuntu. I also have an EBS volume attached to my instance, how do I switch docker to use that instead? Will that fix this problem?
Upvotes: 2
Views: 1659
Reputation: 221
I experienced the same problem : each simple step of the Dockerfile (like ENV or ARG) is taking one or twe seconds on my Amazon Linux EC2 box. To solve this, I have to :
I created /etc/docker/daemon.json with the following content :
{ "storage-driver": "overlay2", "storage-opts": [ "overlay2.override_kernel_check=true" ] }
stop and start the docker daemon.
Now each simple step are very fast.
Upvotes: 1