Entering edit mode
6.9 years ago
SaltedPork
▴
170
Lets say my pipeline requires me to install Samtools from the tar file. Would it make more sense to keep this tar file within the docker image in a folder, or should I put it on GitHub and have it be downloaded when using a command like ?
RUN git clone www.linktogithub.com
What about for programs that can't be downloaded using conda, or apt-get and their only source is a tarball, where do you keep those?
Totally up to you.
If the file is local, you can use
ADD
orCOPY
. Look up the documentation to determine which one is more applicable to your use case.If it's stored somewhere online accessible without credentials, you can just
wget
orgit clone
and proceed to the installation as usual.I use quite a bit of multi-stage builds to reduce the size of the final image, i.e.,
When your image is getting large, this is an elegant way to do it.
Hope it helps.
Yep, it sure does help, thanks.