-
Notifications
You must be signed in to change notification settings - Fork 8.1k
ENGDOCS-2332 #21639
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
ENGDOCS-2332 #21639
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -153,6 +153,7 @@ kubectl | |
| kubefwd | ||
| kubelet | ||
| lookup | ||
| label_file | ||
| macOS | ||
| macvlan | ||
| mfsymlinks | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,10 +56,36 @@ | |
| `action` defines the action to take when changes are detected. If `action` is set to: | ||
|
|
||
| - `rebuild`, Compose rebuilds the service image based on the `build` section and recreates the service with the updated image. | ||
| - `restart`, Compose restarts the service container. Available with Docker Compose version 2.32.0 and later. | ||
| - `sync`, Compose keeps the existing service container(s) running, but synchronizes source files with container content according to the `target` attribute. | ||
| - `sync+restart`, Compose synchronizes source files with container content according to the `target` attribute, and then restarts the container. | ||
| - `sync+restart`, Compose synchronizes source files with container content according to the `target` attribute, and then restarts the container. Available with Docker Compose version 2.23.0 and later. | ||
| - `sync+exec`, Compose synchronizes source files with container content according to the `target` attribute, and then executes a command inside the container. Available with Docker Compose version 2.32.0 and later. | ||
|
|
||
| > `sync+restart` attribute is available with Docker Compose version 2.23.0 and later. | ||
| #### exec | ||
|
Check warning on line 64 in content/reference/compose-file/develop.md
|
||
|
|
||
| {{< introduced compose 2.23.2 "/manuals/compose/releases/release-notes.md#2232" >}} | ||
|
|
||
| `exec` is only relevant when `action` is set to `sync+exec`. Like [service hooks](services.md#post_start), `exec` is used to define the command to be run inside the container once it has started. | ||
|
|
||
| - `command`: Specifies the command to run once the container starts. This attribute is required, and you can choose to use either the shell form or the exec form. | ||
| - `user`: The user to run the command. If not set, the command is run with the same user as the main service command. | ||
| - `privileged`: Lets the command run with privileged access. | ||
| - `working_dir`: The working directory in which to run the command. If not set, it is run in the same working directory as the main service command. | ||
| - `environment`: Sets the environment variables to run the command. While the command inherits the environment variables defined for the service’s main command, this section lets you add new variables or override existing ones. | ||
|
Comment on lines
+70
to
+74
Contributor
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. just a consistency question. this bulleted lists uses
Contributor
Author
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. True! There was no rhyme or reason to it. Good spot - will do a consistency follow up! |
||
|
|
||
| ```yaml | ||
| services: | ||
| frontend: | ||
| image: ... | ||
| develop: | ||
| watch: | ||
| # sync content then run command to reload service without interruption | ||
| - path: ./etc/config | ||
| action: sync+exec | ||
| target: /etc/config/ | ||
| exec: | ||
| command: app reload | ||
| ``` | ||
|
|
||
| #### ignore | ||
|
|
||
|
|
||
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.
Adding this to the vocabulary is not the right way to fix this lint error
If this is to disable the sentence case check, you should disable that rule instead.
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.
it wasn't for the sentence case thing, was being flagged as a 'are you sure you meant..' one.
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.
OK, but there are a lot more headings that are flagged for the same thing in this and the other compose file docs. You could disable spellcheck, or better, wrap the options in code spans, to bypass this rule. Adding all of these params to the vocabulary doesn't seem like a good solution
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.
Ok good to know, will resolve in the follow-up as well