New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the behavior of double dollar signs in env, command and args #101916
Changes from 4 commits
3bbb1f3
538f92d
5ac2f8a
6d77ed7
8a4cdb8
ee1047a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1828,10 +1828,10 @@ type EnvVar struct { | |
// Optional: Defaults to ""; variable references $(VAR_NAME) are expanded | ||
// using the previous defined environment variables in the container and | ||
// any service environment variables. If a variable cannot be resolved, | ||
// the reference in the input string will be unchanged. The $(VAR_NAME) | ||
// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped | ||
// references will never be expanded, regardless of whether the variable | ||
// exists or not. | ||
// the reference in the input string will be unchanged. Double $$ are | ||
// reduced to a single $, which allows for escaping the $(VAR_NAME) | ||
// syntax: i.e. $$(VAR_NAME). Escaped references will never be expanded, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, that makes it more clear indeed. I've processed it. |
||
// regardless of whether the variable exists or not. | ||
// +optional | ||
Value string | ||
// Optional: Specifies a source the value of this var should come from. | ||
|
@@ -2102,16 +2102,16 @@ type Container struct { | |
Image string | ||
// Optional: The docker image's entrypoint is used if this is not provided; cannot be updated. | ||
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable | ||
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax | ||
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, | ||
// regardless of whether the variable exists or not. | ||
// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced | ||
// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. $$(VAR_NAME). Escaped | ||
// references will never be expanded, regardless of whether the variable exists or not. | ||
// +optional | ||
Command []string | ||
// Optional: The docker image's cmd is used if this is not provided; cannot be updated. | ||
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable | ||
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax | ||
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, | ||
// regardless of whether the variable exists or not. | ||
// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced | ||
// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. $$(VAR_NAME). Escaped | ||
// references will never be expanded, regardless of whether the variable exists or not. | ||
// +optional | ||
Args []string | ||
// Optional: Defaults to Docker's default. | ||
|
@@ -3079,16 +3079,16 @@ type EphemeralContainerCommon struct { | |
Image string | ||
// Optional: The docker image's entrypoint is used if this is not provided; cannot be updated. | ||
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable | ||
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax | ||
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, | ||
// regardless of whether the variable exists or not. | ||
// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced | ||
// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. $$(VAR_NAME). Escaped | ||
// references will never be expanded, regardless of whether the variable exists or not. | ||
// +optional | ||
Command []string | ||
// Optional: The docker image's cmd is used if this is not provided; cannot be updated. | ||
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable | ||
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax | ||
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, | ||
// regardless of whether the variable exists or not. | ||
// cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced | ||
// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. $$(VAR_NAME). Escaped | ||
// references will never be expanded, regardless of whether the variable exists or not. | ||
// +optional | ||
Args []string | ||
// Optional: Defaults to Docker's default. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while we are editing - s/previous/previously/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find, I've took it with my doc changes