Thanks to visit codestin.com
Credit goes to github.com

Skip to content

builder: Update documentation WRT environment replacement#8807

Merged
SvenDowideit merged 1 commit into
moby:masterfrom
erikh:builder_docs
Oct 28, 2014
Merged

builder: Update documentation WRT environment replacement#8807
SvenDowideit merged 1 commit into
moby:masterfrom
erikh:builder_docs

Conversation

@erikh

@erikh erikh commented Oct 27, 2014

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this from a specific release onwards? Is it worth calling that out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a Dockerfile for 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.

@erikh

erikh commented Oct 27, 2014

Copy link
Copy Markdown
Contributor Author

@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.

@jamtur01

Copy link
Copy Markdown
Contributor

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.

Comment thread docs/sources/reference/builder.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not at all clear to me what env. vars are being compared to here. Similarly to what?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a Dockerfile for building
images.

+### Environment Replacement (as of 1.3)
+
+Note: prior to 1.3, Dockerfile environment 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.

Comment thread docs/sources/reference/builder.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a Dockerfile for 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@erikh

erikh commented Oct 27, 2014

Copy link
Copy Markdown
Contributor Author

I’ll see if I can improve this, thanks.

On Oct 27, 2014, at 3:07 PM, James Turnbull [email protected] wrote:

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.


Reply to this email directly or view it on GitHub #8807 (comment).

@erikh

erikh commented Oct 27, 2014

Copy link
Copy Markdown
Contributor Author

@fredlf @jamtur01 updated; please validate. This is my top prio today so don't hesitate to suggest changes.

@jamtur01

Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Dockerfile are:
+
+* ENV
+* ADD
+* COPY
+* WORKDIR
+* EXPOSE
+* VOLUME
+* USER
+
+ONBUILD instructions 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

@thaJeztah

Copy link
Copy Markdown
Member

Apart from my note, thanks! Clear explanation and I learned a thing or two by reading this, which is always a good thing :)

Comment thread docs/sources/reference/builder.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on what --> as to which. Missed it before, sorry.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a Dockerfile for building
images.

+### Environment Replacement
+
+Note: prior to 1.3, Dockerfile environment 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.

@fredlf

fredlf commented Oct 27, 2014

Copy link
Copy Markdown
Contributor

LGTM, will revise later.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <[email protected]> (github: erikh)
SvenDowideit added a commit that referenced this pull request Oct 28, 2014
builder: Update documentation WRT environment replacement
@SvenDowideit SvenDowideit merged commit 413f2ef into moby:master Oct 28, 2014
SvenDowideit added a commit to SvenDowideit/docker that referenced this pull request Nov 6, 2014
builder: Update documentation WRT environment replacement
(cherry picked from commit 413f2ef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants