Skip to content

improve cp documentation with some illustration examples - #3463

Merged
thaJeztah merged 1 commit into
docker:masterfrom
ndeloof:cp_docs
Mar 9, 2022
Merged

improve cp documentation with some illustration examples#3463
thaJeztah merged 1 commit into
docker:masterfrom
ndeloof:cp_docs

Conversation

@ndeloof

Copy link
Copy Markdown
Contributor

closes#3431

- What I did
Added examples on docker cp reference documentation

@ndeloof
ndeloof requested a review from thaJeztah as a code ownerMarch 9, 2022 10:16
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #3463 (cbaca6b) into master (ab7cc48) will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@## master #3463 +/- ##
=======================================
Coverage 58.99% 58.99% =======================================
Files 284 284 Lines 23848 23848 =======================================
Hits 14068 14068 Misses 8920 8920 Partials 860 860 

@thaJeztahthaJeztah left a comment

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.

Thanks! Left one comment to be fixed (and some nits while at it 😅)

Comment threaddocs/reference/commandline/cp.md Outdated
$ docker cp CONTAINER:/var/logs/app.log - | tar x -O | grep "ERROR"
```

## Corner cases

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.

Can you change this to a H3? The yamldocs we generate for docs.docker.com collect everything under the H2 Description and H2 Examples sections. Putting this as a H2 causes it to be skipped (but it will be included if it's a H3 within the "examples" section

Suggested change
## Corner cases
###Corner cases

Comment on lines +94 to +96
Copy a local file into container
```console

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.

While you're fixing the H2 -> H3, could you also put a blank line between the text and the "code" block? It's not strictly needed (we did have issues with that in the past, but I think those are solved), but it's consistent with how we use them everywhere

So;

Some text before the example code
```console
$ echo "I am the example code"
```

Comment on lines +99 to +102
Copy files from container to local path
```console

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.

Same here (and the next one below)

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>

@thaJeztahthaJeztah left a comment

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.

LGTM, thanks!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add example of docker cp copying to/from stdout

4 participants

@ndeloof@codecov-commenter@rumpl@thaJeztah