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/*
%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
.