docker-phantomjs2 icon indicating copy to clipboard operation
docker-phantomjs2 copied to clipboard

Replace curl with wget on final image

Open fgrehm opened this issue 10 years ago • 4 comments

Apparently wget has less dependencies and we could use it instead of curl to download the tarball, reducing the image size a bit more.

fgrehm avatar Jul 23 '15 01:07 fgrehm

You might also be able to use the Dockerfile ADD command

dtjm avatar Sep 03 '15 20:09 dtjm

The problem is that in order to build the image on the Docker hub, I'd need to add the ~50MB tarball into source control since remotely ADDed tarballs are not extracted. As a result, we'd have an extra 50MB Docker image layer with a tarball that would be extracted in a following RUN tar xz ... and my goal is to keep this image as small as possible :beers:

fgrehm avatar Sep 03 '15 22:09 fgrehm

Could you uninstall curl afterwards to reduce the image size even more?

dtjm avatar Sep 04 '15 03:09 dtjm

Right now we are bundling ubuntu's cURL when dockerizing phantomjs and we would still have curl around even though we can uninstall it we extract the tarball :cry:

IIRC I had some trouble getting phantomjs to connect to external servers and the simplest thing I could do to make it work was to bundle curl and its dependencies on that "dockerized tarball". Once we are able to figure out what is the actual dependency needed to make phantomjs work fine, we can move on to uninstalling curl after extracting the dockerized phantomjs tarball :sweat_smile:

fgrehm avatar Sep 10 '15 03:09 fgrehm