"Empty continuation lines will become errors"… how should I comment my Dockerfile now? : <p>Consider the following Dockerfile:</p>

<pre class="lang-docker prettyprint-override"><code>FROM alpine:edge

EXPOSE \
# web portal
8080 \
# backdoor
8081
</code></pre>

<p>Built like so:</p>

<pre class="lang-bash prettyprint-override"><code>docker build .
</code></pre>

<p>We observe such output:</p>

<pre><code>Sending build context to Docker daemon  17.1TB
Step 1/2 : FROM alpine:edge
 ---&gt; 7463224280b0
Step 2/2 : EXPOSE 8080 8081
 ---&gt; Using cache
 ---&gt; 7953f8df04d9
[WARNING]: Empty continuation line found in:
    EXPOSE 8080 8081
[WARNING]: Empty continuation lines will become errors in a future release.
Successfully built 7953f8df04d9
</code></pre>

<p>So, given that it'll soon become illegal to put comments in the middle of a multi-line section: <strong>what's the new recommended way to comment multi-line commands</strong>?</p>

<p>This is particularly important for <code>RUN</code> commands, since we are encouraged to reduce image layers by <code>&amp;&amp;</code>ing commands together.</p>

<hr>

<p>Not sure exactly when this was introduced, but I'm currently experiencing this in version:</p>

<pre><code>🍔 docker --version
Docker version 17.07.0-ce, build 8784753
</code></pre>

<p>I'm using Docker's <em>edge</em> release stream, so maybe this will not yet look familiar if you are using Docker stable.</p>
