Solved copy file into docker container

Currently reading
Solved copy file into docker container

295
32
NAS
DS1019+ DSM6
Operating system
  1. Windows
Mobile operating system
  1. iOS
i've got a docker installed that gives me an SQL2000 server (rsmoorthy/sql2000)
it works fine, but i need to restore a database in to it.
i have the database backup file, but i need to place the file inside the docker before i can import it.

how do i place the file inside it?
it doesn't seem to be able to open a bash window
 
Hmm, the dockerhub page mentions no container paths to be mapped out as volumes.
Seems like this image is supposed to write data into the container layer - this is way slower than writting data to a volume, as data is written in a copy-on-write layer on top of the image layers.

You can either use docker cp /path/in/ds {container name or id}:/path/in/container or stop the container, edit its details and bind-mount a host path to a container path in the "volume" tab.

I find it rather spooky that the image is 5 years old and not updated since. Also the missing hint about volums is a major turn off for me.
 
it being 5 years old is probably because SQL2000 stopped being used about 20 years ago 😆
i just use it as a test environment anyway. it saves me having to run a VM to host SQL.
 
You can either use docker cp /path/in/ds {container name or id}:/path/in/container or stop the container, edit its details and bind-mount a host path to a container path in the "volume" tab.

but won't i need to know the folder structure inside the container first?
 
From the perpective of docker: you can copy folders/files to any path in the container.

From the perspective of mssyl: not sure if it will accept any path to look for import, you will need to figure this out out. If only there would be some documentation to point you in the right direction *cough*
 
well i believe the docker provides things like "windows" (it's runs wine as it's base i believe).
when i attempt to import a database file it asks for the local location (from within the docker) and it presents a C and Z drive.

it seem even the developer can't remember how to do it.

Annotation 2020-05-14 181901.jpg
 
Last edited:
In the "how i build the imag" docs, I can see that they use hte path ~/.wine/drive_c.
Open a terminal in the container. execute "cd ~/.wine/drive_c", then execute "pwd" to get the absolute path to "drive c" in the container.... then copy your files to a sub folder of this path.

Ah, drive Z actualy is the container's filesystems root. Thus: copy the file wherever you want.

Update: Honestly, I would shut down the container, map a folder from the ds to the container path /sql_import (or something like that) and start the container again. Then you should be able to access the files from within the container from drive z:\sql_import.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Well I have been busy today so didn't have time to answer sooner, but @one-eyed-king said it all. So in...
Replies
4
Views
1,606
  • Question
Deployed Portainer in under 30 mins and up & running. Thanks.
Replies
2
Views
4,082
yep - i spend 5 hours on this today. it's driving me crazy. it's def the same version as it says so and is...
Replies
16
Views
3,669
Hint: the volume /var/www/app/include includes files that become invisible to the container, if you map a...
Replies
4
Views
2,179
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
401
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
967
  • Question
Open an issue on that GitHub page. The developers will be glad to assist. OP has posted two threads on...
Replies
5
Views
965

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top