Skip to content
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

Introduce "cp" command #7029

Closed
wants to merge 2 commits into from
Closed

Introduce "cp" command #7029

wants to merge 2 commits into from

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Nov 19, 2019

to mimic docker cp UX but using service abstraction
delegates to the actual docker cp command once target container has been
resolved

Mostly to check interest by maintainers, or maybe we should just reject #5523 and document workaround.

compose/cli/main.py Outdated Show resolved Hide resolved
compose/cli/main.py Outdated Show resolved Hide resolved
compose/cli/main.py Outdated Show resolved Hide resolved
compose/cli/main.py Outdated Show resolved Hide resolved
compose/cli/main.py Outdated Show resolved Hide resolved
compose/cli/main.py Outdated Show resolved Hide resolved
to mimic `docker cp` UX but using service abstraction
delegates to the actual docker cp command once target container has been
resolved

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
compose/cli/utils.py Outdated Show resolved Hide resolved
if not os.path.isabs(path) and not path.startswith('.'):
parts = path.split(":", 2)
if len(parts) == 2:
return (parts[0], parts[1])

Choose a reason for hiding this comment

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

Suggested change
return (parts[0], parts[1])
return parts[0], parts[1]

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Co-Authored-By: Ulysses Souza <ulysses.souza@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@barelnir
Copy link

barelnir commented Nov 25, 2019

Hi,

what is the status of this pull request? can it be merged to master as part of next docker-compose version?

@ndeloof
Copy link
Contributor Author

ndeloof commented Nov 25, 2019

This is just a proposal.

  • miss test case to cover this new feature
  • miss documentation
  • need to confirm with other maitainers delegating to docker cp is the right thing to do, or if we want to rely on docker-py (more code, more bugs imho)

@ndeloof ndeloof closed this Sep 6, 2021
@ndeloof ndeloof deleted the copy branch December 20, 2023 13:41
Sign up for free to 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.

None yet

5 participants