-
Notifications
You must be signed in to change notification settings - Fork 2
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
docker cp not working properly #18
Comments
Good day! I am glad you found Meanwhile, it would be useful if you provided a minimal reproducible example: which containers I need to start and which commands to run (starting with the volume creation) to reproduce the issue. Logs can be useful too. If you're running the docker-on-top executable manually, you can just provide the output it generates. If you're using a systemd service, you can access the logs via |
WoW, that was quick! It contains these files:
спасибо (which is most of the Russian I remember from the time when I had time to learn languages 😉) |
Hello again! I was able to reproduce the issue. The docker-on-top code erroneously assumes that a volume could only be mounted several times if there are several containers using it, and, vice versa, if it's only mounted in one container, it should be mounted just once. The assumption breaks when using I will look into it soon and, hopefully, fix it by the end of the week |
Hm. After a deeper investigation, it appears to me that this is a bug of dockerd rather than docker-on-top. At least, according to the documentation, the assumption I described above that Upstream issue: moby/moby#47964 It's taking longer than I was hoping it would... But I hope this week I will have enough time to try and submit a patch for dockerd |
Thanks for all the effort you are putting into it even if the bug it's not in docker-on-top. I will keep an eye also in the upstream issue to see if it gets fixed. |
Hello there! It's been a while. A few days ago I submitted a PR: moby/moby#48096. It fixes the issue on Linux, however, it's not yet ready for merge:
I opened the PR because I wanted to synchronize with the maintainers and agree in which direction I should be going (and also ask them some questions about the code) but opening the PR alone did not attract them. Maybe I should ping a particular person but after (briefly) glancing through the contribution guidelines I didn't find which person I should ping. Moreover, in the next couple of weeks I may not have much time to work on this, even if someone does come there to answer my questions. Anyway! Back to Docker-on-Top! I see three things that can be done about this issue (#18):
|
Thanks for the update, I have been following the [lack] of progress of the PR, I hope someone gets in touch and fixes it. The workaround I have taken for the time being is to check whether the container is running or not, if it's not do a docker cp, if it is do a cp from the mountpoint folder. It's a script so it does not really hurt. I may try to send you a PR, I have looked into the code and it does not seem too hard:
|
Just a quick update, I'm working on a solution I hope to finish it by the end of the week. |
I have just sent you a pull request that fixes this issue, I hope it is to your liking ☺. |
Hello,
Fist of all, thanks for the driver and the work you put into it, it's great, it saves me a lot of time when creating containers.
I discovered a bug, the issue is the following:
When I start the container the volume correctly mounts.
Then, while the container is running I run a "docker cp".
When the "docker cp" ends the volume unmounts (i.e. the "mountpoint" folder is no longer there)
The running container does not like that.
Doing a "docker cp" with an stopped container or starting and stoping the container work just fine.
If you could fix it or give me some indications on where to look would be really nice (I cannot do it without help due to my total lack of knowledge of Go and Docker drivers)
Thans!
The text was updated successfully, but these errors were encountered: