I’m trying to configure my Dockerfile to fetch two tar.gz files located in a Google Drive account from the https://googledrive.com/host/<share_key> url. I want to grab the file and unpack it to a folder in my image so the files are available when my container runs.
I have tried to do this using RUN wget and ADD. With RUN wget && unzip it works in the docker-compose build stage - says file extracted fine and no errors but when I start my container with docker-compose up the files are not there!
After I read that ADD would automagically unpack my file I tried replacing my wget unzip logic by the ADD command and now I see the file when I run my container but it is not unpacked! My guess is that this is due to the being a google drive file and for some reason the ADD command downloads the file with the share_key name (no extensions).
EX: ADD https://googledrive.com/host/share_key /my/output/dir
will create the /my/output/dir/share_key file (without any extensions). Even if I hardcode the file name with .tar.gz it will not be unpacked - guess it uses the source name for deciding if it should be unpacked and not the destination name?
What am I missing here? I’ve looked at several dockerfiles and at least the WGET approach should’ve worked…
Any help greatly appreciated!