bombz Posted October 27, 2022 Share Posted October 27, 2022 (edited) Hello, I have successfully connected to my Unraid SSH as I usually do, then figured out how to bash into a docker container to list the files of the root of that container docker exec -it dockercontainername /bin/bash I can then 'ls' to see the files I want to copy or move to either 01. a location on the UnRAID array - eg. /mnt/cache 02. the windows system I am on I can't figure out how to copy the file so I can gain access to it. Does anyone know the method to do this I tried some cp commands and scp commands and have not been successful I don't really want to have to do a hexdump and piece this together, there has to be a way to get content out of the docker container and back into another container Im not talking about the containers on appdata/cache/dockerimagename talking about the files within the docker container itself Thank you, Edited October 29, 2022 by bombz Quote Link to comment
Solution bombz Posted October 28, 2022 Author Solution Share Posted October 28, 2022 (edited) EDIT After hunting and searching I was able to successfully figure out how to connect to docker container sudo and nano within docker copy files from docker container to unraid copy files from unraid to docker container(s) How to connect to docker container: docker exec -it contaidername /bin/bash ls -l To find the files or paths that need to be accessed for the copy command exit Add sudo & nano within docker container: Sudo: root@dockercontainerID# apk add sudo (1/1) Installing sudo (1.9.10-r0) Executing busybox-1.35.0-r17.trigger OK: 279 MiB in 80 packages Nano: root@dockercontainerID:/# apk add nano fetch http://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz (1/1) Installing nano (6.3-r0) Executing busybox-1.35.0-r17.trigger OK: 277 MiB in 79 packages How to copy files from docker container to UnRaid server: root@servername:~# sudo docker cp containername:/filename.xxx ~/file path on unraid -OR- root@servername:~# sudo docker cp containername:/filename.xxx /file path on unraid EXAMPLE: root@servername:~# sudo docker cp mariadb:/filename.txt ~/mnt/cache/ How to copy files from Unraid server to docker container: root@servername:~# sudo docker cp /unraid/location/123.txt containername:/ EXAMPLE:: root@servername:~# sudo docker cp /mnt/cache/123.txt mariadb:/ Hope that helps someone going down the same path as me tonight Cheers! Edited February 26, 2023 by bombz 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.