Replace curl with wget on final image
Apparently wget has less dependencies and we could use it instead of curl to download the tarball, reducing the image size a bit more.
You might also be able to use the Dockerfile ADD command
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:
Could you uninstall curl afterwards to reduce the image size even more?
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: