I know it's customary to have run-on RUN commands in docker files to reduce steps/space. However, as these get long, I'd also like to add more comments to make the command clear.
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \ # I WANT A COMMENT on what this step is doing
&& apt-get install -y software-properties-common # comments also don't work here, before the slash \
What's the docker/bash syntax or docker convention that would allow comments next to individual steps? If I put the comment where indicated above, I get the error
$ sudo docker build .
Sending build context to Docker daemon 4.608kB
Error response from daemon: Dockerfile parse error line 5: unknown instruction: &&
Which makes sense from a bash perspective but leaves me with few options for communicating the intent of the line.