Closed cmeury closed 6 years ago
They are for 2 different cases. The curl in wercker.yml
is installed to download the latest versions into the step, but it's not included when the actual step is built. run.sh
runs on the actual docker container you run the step in and in case a version needs to be downloaded, it ensures that curl is installed.
I hope that clears it up, otherwise I'll try to give a better explanation.
Ah, that makes sense. The thing is, every time this step is used, curl is downloaded. Can we optimize that? Using Wercker cache? Does that have to be done on the "user" side or on the step side?
It really should only download curl if it isn't installed yet, but it isn't commonly installed in base Docker imagers, so it makes sense. I've done a quick check, and it looks like I always install because of dependencies on the Hugo side. Particularly because it makes some https calls that require it. This was 2 years ago however, so I might have a check soon to see if it is still required.
It probably still is however so it's unlikely to help and I can't do anything else to help there due to the way steps work.
On your side the easiest way to speed things up will be to use (or create) a docker image that already has curl installed. If that is the case, it won't try to install it again. The easiest way to do so would probably be extending the image you're currently using, uploading it to a free account on Docker Hub (unless you already use a private repo for your current image), and using that as the box in your wercker.yml
.
An example Dockerfile you could use is the below.
FROM debian
RUN apt-get install -y curl
Yeah, I might create a separate base image. Thanks!
Is there a reason to install it again in
run.sh
? It's already mentioned in wercker.yml.