wercker-cli - copying source to container takes a few minutes - how to make it faster

104 views Asked by At

I'm running php/mysql/laravel project in wercker - to perform phpunit tests.

I installed wercker-cli and docker on my macbook. I'm able to run it exactly in the same way as on remote wercker.com, however localy it takes much longer that remotely.

Longest step is when sources are copied to container. Is there any way to bypass this step or cache? Disk SSD, 3GB reserved for Docker.

What exactly this step is doing?

wercker build --expose-ports
--> No Docker host specified, checking: /var/run/docker.sock
--> Executing pipeline
--> Running step: setup environment
Pulling from library/php: 7.1-fpm
Digest: 

sha256:2e94b90aa3...f3b355fb
Status: Image is up to date for php:7.1-fpm
-->  Copying source to container
1

There are 1 answers

0
xurei On

I had the same issue a few days ago on a Node stack, with a lot of dependencies in node_modules.

The solution I found to make it faster was to clone from my git repository in a fresh path, NOT installing the dependencies and running Wercker from there.

I went from ~2minutes of copy to <1s ^_^

NOTE : I think that a .werckerignore file should also do the job.