singularityhub / interface

user interface for managing containers with sregistry global client, and making recipes
https://singularityhub.github.io/interface/
GNU Affero General Public License v3.0
2 stars 0 forks source link

[builder] chained commands #32

Closed samcmill closed 6 years ago

samcmill commented 6 years ago

It is common in Docker to chain commands together into a single layer and break the command so it does not exceed 80 characters. For instance:

RUN apt-get update -y && \
  apt-get-install -y --no-install-recommends \
     python \
     python3 && \
  rm -rf /var/lib/apt/lists/* 

This is converted to Singularity as

%post
apt-get update -y && \
apt-get install -y --no-install-recommends \
python \
python3 && \
rm -rf /var/lig/apt/lists/*

The builder then interprets this as 5 effective commands rather than 1 long command split over 5 lines. The builder fails when trying to run python.

vsoch commented 6 years ago

Ditto here! Please post this issue on the spython board and close here --> https://www.github.com/singularityhub/singularity-cli/issues the builder just uses the functions from there to do the conversion. Thank you!