I am building a container using Jib's Maven plugin.
I have a file called /tmp/folder/file.json
on my host machine, which I need to be able to read from inside a container.
I tried to mount /tmp/folder
using the volumes feature:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<to>
<image>myimage</image>
</to>
<container>
<volumes>
<volume>/tmp/folder</volume>
</volumes>
</container>
</configuration>
</plugin>
I think /tmp/folder
is accessible from the container but file.json
isn't. At least when I try this
docker exec -it my_cotainer /bin/ls /tmp/folder
Nothing comes back.
Am I using the volumes feature correctly?