Open dchsueh opened 6 years ago
Interesting - never seen:
/bin/foo \
&& /bin/bar
Is this, in your experience, a common pattern? We've always seen:
/bin/foo && \
/bin/bar
I don't think there is any pattern or requirement that individual run commands be on a line, or the && token be at the beginning or at the end. For example, see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run "Below is a well-formed RUN instruction..." where the first cmd is part of the first line, the second command starts on the first line and runs for another n-2, and the last command is on its own line with && in front.
The backslashed-newline just means "not done yet". For ansible-container import, maybe everything can just be dumped into one shell call with backslash-newline removed and everything concatenated.
ISSUE TYPE
container.yml
not applicable
OS / ENVIRONMENT
using virtualenv, ansible-container installed from github repo checkout from 2017-12-13 also confirmed with current pip-installed ansible-container version (0.9.2?)
SUMMARY
importing a docker context dir with Dockerfile containing multiline ADD command, e.g.
results in a \<currentdir>/roles/\<docker-context-dir>/tasks/main.yml containing:
STEPS TO REPRODUCE
as per summary above
EXPECTED RESULTS
a correct shell task, either concatenated into one line, or a single multiline shell task
ACTUAL RESULTS
resulting .../roles/.../tasks/main.yml shown in summary above the import will succeed but the yml needs editing in order to run