builder: Update documentation WRT environment replacement#8807
Conversation
There was a problem hiding this comment.
Is this from a specific release onwards? Is it worth calling that out?
There was a problem hiding this comment.
Kind of; it’s 1.3.x for this specific behavior, but it was similar before.
I can annotate it.
On Oct 27, 2014, at 1:46 PM, James Turnbull [email protected] wrote:
In docs/sources/reference/builder.md:
@@ -104,6 +104,33 @@ be treated as an argument. This allows statements like:
Here is the set of instructions you can use in aDockerfilefor building
images.+### Environment Replacement
Is this from a specific release onwards? Is it worth calling that out?—
Reply to this email directly or view it on GitHub https://github.com/docker/docker/pull/8807/files#r19435875.
|
@jamtur01 to the best of my knowledge all your requests have been addressed, please validate. I tried to be a little more forthcoming on the format of the example and the specific nature of the 1.3 changes. |
|
Still don't think the example is clear - what's happening in it? Why is one variable wrapped in braces? I'd move the line after "Example" and the comments to a couple of sentences after the example walking through what is happening. |
There was a problem hiding this comment.
It's not at all clear to me what env. vars are being compared to here. Similarly to what?
There was a problem hiding this comment.
similarly to how they were handled in prior to 1.3?
On Oct 27, 2014, at 3:25 PM, Fred Lifton [email protected] wrote:
In docs/sources/reference/builder.md:
@@ -104,6 +104,37 @@ be treated as an argument. This allows statements like:
Here is the set of instructions you can use in aDockerfilefor building
images.+### Environment Replacement (as of 1.3)
+
+Note: prior to 1.3,Dockerfileenvironment variables were handled
+similarly, but not exactly the same -- there was no formal definition at the
It's not at all clear to me what env. vars are being compared to here. Similarly to what?—
Reply to this email directly or view it on GitHub https://github.com/docker/docker/pull/8807/files#r19442175.
There was a problem hiding this comment.
Not sure we want or need this version information. The docs are versioned, so we should just describe the behavior in the current version. If we want to to broadcast the change, I'd suggest we use release notes for that.
There was a problem hiding this comment.
OK. You guys need to figure this out — which style is best -- and get back to me.
On Oct 27, 2014, at 3:30 PM, Fred Lifton [email protected] wrote:
In docs/sources/reference/builder.md:
@@ -104,6 +104,37 @@ be treated as an argument. This allows statements like:
Here is the set of instructions you can use in aDockerfilefor building
images.+### Environment Replacement (as of 1.3)
Not sure we want or need this version information. The docs are versioned, so we should just describe the behavior in the current version. If we want to to broadcast the change, I'd suggest we use release notes for that.—
Reply to this email directly or view it on GitHub https://github.com/docker/docker/pull/8807/files#r19442466.
There was a problem hiding this comment.
Ah, sorry. I didn't see @jamtur01 's comments from earlier. Didn't mean to send a mixed message. I think this is good enough to ship now, I'll label it for later editing.
|
I’ll see if I can improve this, thanks.
|
|
LGTM |
There was a problem hiding this comment.
Nothing to stop this from being merged, but reading this, I wonder why and perhaps this needs some extra clarification; is this by design? Not implemented (yet)? Not supported because of possible security implications?
A bit of explanation may prevent needless support tickets and/or discussions.
There was a problem hiding this comment.
There are too many sandboxing issues with environment replacement — I made a semi-executive decision to exclude them for now.
On Oct 27, 2014, at 4:14 PM, Sebastiaan van Stijn [email protected] wrote:
In docs/sources/reference/builder.md:
- WORKDIR ${foo} # WORKDIR /bar
- ADD . $foo # ADD . /bar
- COPY $foo /quux # COPY $foo /quux
+The instructions that handle environment variables in the
Dockerfileare:
+
+*ENV
+*ADD
+*COPY
+*WORKDIR
+*EXPOSE
+*VOLUME
+*USER
+
+ONBUILDinstructions are NOT supported for environment replacement, even
+the instructions above.
Nothing to stop this from being merged, but reading this, I wonder why and perhaps this needs some extra clarification; is this by design? Not implemented (yet)? Not supported because of possible security implications?A bit of explanation may prevent needless support tickets and/or discussions.
—
Reply to this email directly or view it on GitHub https://github.com/docker/docker/pull/8807/files#r19444373.
There was a problem hiding this comment.
Think its worth it to mention that in layman's terms (because of the reasons mentioned)?
Leave that decision up to you and the doc maintainers :)
|
Apart from my note, thanks! Clear explanation and I learned a thing or two by reading this, which is always a good thing :) |
There was a problem hiding this comment.
on what --> as to which. Missed it before, sorry.
There was a problem hiding this comment.
Fixed.
On Oct 27, 2014, at 4:27 PM, Fred Lifton [email protected] wrote:
In docs/sources/reference/builder.md:
@@ -104,6 +104,46 @@ be treated as an argument. This allows statements like:
Here is the set of instructions you can use in aDockerfilefor building
images.+### Environment Replacement
+
+Note: prior to 1.3,Dockerfileenvironment variables were handled
+similarly, in that they would be replaced as described below. However, there
+was no formal definition on what instructions handled environment replacement
on what --> as to which. Missed it before, sorry.—
Reply to this email directly or view it on GitHub https://github.com/docker/docker/pull/8807/files#r19444880.
|
LGTM, will revise later. |
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <[email protected]> (github: erikh)
builder: Update documentation WRT environment replacement
builder: Update documentation WRT environment replacement (cherry picked from commit 413f2ef)
@fredlf @SvenDowideit @jamtur01 @tiborvass