3 ms·
I prefer heredoc[1] syntax. I find it more readable and portable. [1] https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/ https://www.docker.
by mcstafford 1y ago
I prefer heredoc[1] syntax.
I find it more readable and portable.
[1] https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/ https://www.docker.com/blog/introduction-to-heredocs-in-dock...
- yjftsjthsd-h 1y agoMeta: In HN, prefix a line with 2 spaces to get code formatting, ex. # syntax=docker/dockerfile:1.3-labs FROM alpine RUN <<EOF echo "This is a heredoc example" echo "It allows multi-line commands" EOF Non-meta: Do you happen to know how portable that is across old docker, podman/buildah, kaniko, etc.? I'd like to adopt it but I don't want it to bite me when I'm not running a recent version of literal docker.
- vbezhenar 1y agoIt is new feature and not portable to old versions. But modern podman supports it. No idea about kaniko.