-
Notifications
You must be signed in to change notification settings - Fork 11
Tips
rsdmse edited this page Jul 4, 2020
·
8 revisions
- For simple package installation, use
alpine.- Example: Inkscape
- Start from a Docker official image if possible.
- Use the
-slimtag if provided.
LABEL maintainer=<user>@virginia.eduThe installation command and clean up command must be in the same RUN statement.
RUN apt-get update && apt-get install -y --no-install-recommends \
... && \
rm -rf /var/lib/apt/lists/*- Flag
-yis needed - Use
--no-install-recommendsto avoid installing unnecessary packages - Line breaks are optional
RUN yum -y install ... && \
yum -y clean all && rm -rf /var/cache/yumRUN apk add --no-cache ...No separate clean up is needed.
RUN conda install ... && \
conda clean --allRUN pip install --no-cache-dir ...But it is not necessary to concatenate everything into one RUN command.
- Example: Hydrator has one for
apt-getand another for the software.
- Add
PATH,LD_LIBRARY_PATH, etc. for user's convenience. - Set
LC_ALL C(or some other locale).
This is the command that will be executed upon singularity run <app>_<tag>.sif or equivalently ./<app>_<tag>.sif.