I'm trying to get a setup where I can deploy a Docker Container with a java app installed on it where the app can write to a folder in the container and for those files to appear on the host machine.
I believe that a
type=bind is the correct solution for this. However, I cannot seem to get the mount to show up when I run
docker inspect MyContainer.
My full setup is as follows;
FROM openjdk:14.0.2-jdk-nanoserver WORKDIR /monitor COPY target/monitor.jar ./ ENTRYPOINT ["java", "-jar", "monitor.jar"] --restart unless-stopped
docker build -t monitor .
and my Run command:
docker run --restart unless-stopped --name MonitorContainer monitor --mount type=bind,source=C:/test,target=/monitor
With the above, I'm attempting to have the folder
C:/test available for read and write inside the container at the path
/monitor. However, when I run
docker inspect StreamMonitorContainer I see that the mount section is empty so it appears the mount is not created.
I receive no errors, so it's all rather confusing.
I would appreciate any help, I'm completely novice at this so please be nice :)
p.s. This question differs from Docker bind mount usage because it's dealing with Volumes, not Bind Mounts (despite the title.)</div