Copy files between your Intersystems Docker Instance and your host (jdbc driver sample)
Many times it is necessary copy or send files to your docker container instance.
In my case was with IRIS JDBC driver.
Docker has this recipe for this (credits to https://docs.docker.com/engine/reference/commandline/cp/):
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|- docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
But to copy you need your container name. Write this command for this:
In my, my-iris is the container name.
If you need to know file location into your docker file system too, write:
1. To go to bash of your docker instance: docker exec -it my-iris /bin/bash.
2. Write cd .. to get to root path, if necessary.
3. Find your file path if this command: find $directory -type f -name "*jdbc*.jar" (in my case, I want to find jdbc driver path).
4. And now you can copy the file found. Write:
docker cp my-iris:/usr/irissys/dev/java/lib/JDK18/intersystems-jdbc-3.1.0.jar c:\aplicativos
5. To the other hand, you can send files to your docker following this: docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH.