Hi All,
This is my first post to get some help on docker issue that my customer is facing though I am not expert in docker, but I did good amount of research before posting this.
Issue: My customer was claiming that previously he was able to SSH to docker host (Ubuntu) on port 2222 using a SSH GUI client and then browse to /var/atlassian/jira/import to import files from his local PC so that those files will be uploaded to docker container (there must be a bind volume) then he can login to the application to see those files were there for other purposes. When I looked at the issue first time, I could not see PORT 2222 while executing “docker port containername” or “docker ps” . Only 8080 port was listed there. Another thing is, when I asked to run inspect command to get mount details, they provided below;
"Mounts": [
{
"Name": "server_config",
"Source": "/var/lib/docker/volumes/server_config/_data",
"Destination": "/opt/atlassian/jira/conf",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": "rprivate"
},
{
"Name": "server_logs",
"Source": "/var/lib/docker/volumes/server_logs/_data",
"Destination": "/opt/atlassian/jira/logs",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": "rprivate"
},
{
"Name": "server_data",
"Source": "/var/lib/docker/volumes/server_data/_data",
"Destination": "/var/atlassian/jira",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": "rprivate"
}
]
“HostConfig”: {
“Binds”: [
“server_config:/opt/atlassian/jira/conf”,
“server_data:/var/atlassian/jira”,
“server_logs:/opt/atlassian/jira/logs”
],
“ContainerIDFile”: “”,
The above seems to be data volumes. I have a similar docker image with me and replicated issue locally. But when I recreate docker run with -v and -p options, all I can see is a new application installation comes up (which means changes I made to original image/data or lost). Then I see docker commit to commit container to an image, but this won’t include the data from volumes. I see the data is now in, /var/lib/docker/volumes/server_data/_data. Can I dynamically add new mounts or expose ports to the running container?
How can I resolve this issue so the docker container preserve the data as is and be able to SSH on port 2222 to get to docker host and copy files to the container? Currently docker cp command works but wanted to do this through a SSH client.
Any help or suggestions would be greatly appreciated.
Thanks
Shankar