I am trying to get some code into my docker container
. One method I was looking into is using volumes. I am trying to hook my code into the containers generated by this project.
https://github.com/cloudera/clusterdock
Within the project, I added the line -v /Users/bi1/Development/QE/sink:/var/hostsrc \
into the file clusterdock.sh
sudo docker run --net=host -t \
--privileged \
${TARGET_DIR_MOUNT} \
${TOPOLOGY_VOLUME} \
${REGISTRY_INSECURE} \
${REGISTRY_USERNAME} \
${REGISTRY_PASSWORD} \
-v /tmp/clusterdock \
-v /etc/hosts:/etc/hosts \
-v /etc/localtime:/etc/localtime \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /Users/bi1/Development/QE/sink:/var/hostsrc \
"${CLUSTERDOCK_IMAGE}" $@
if [ -n "${TOPOLOGY_CONTAINER_ID}" ]; then
sudo docker rm -v "${TOPOLOGY_CONTAINER_ID}" &> /dev/null
fi
}
When I run docker inspect {containerId}
I see
...
"Mounts": [
{
"Type": "bind",
"Source": "/etc/localtime",
"Destination": "/etc/localtime",
"Mode": "rw",
"RW": true,
"Propagation": ""
}
],
...
How come even though I created a volume I can't see it when I inspect
? Are my containers even linked to these volumes?