docker - Dockerfile if else condition with external ...
https://stackoverflow.com/questions/4365465626.04.2017 · The accepted answer may solve the question, but if you want multiline if conditions in the dockerfile, you can do that placing \ at the end of each line (similar to how you would do in a shell script) and ending each command with ;.You can even define someting like set -eux as the 1st command.. Example: RUN set -eux; \ if [ -f /path/to/file ]; then \ mv /path/to/file /dest; \ fi; \ if [ -d ...