Docker Community Forums

Share and learn in the Docker community.

Files not written to volume mount

beta

(Manoswerts) #1

Expected behavior

File keystore/ssl.keystore is available in my volume mount.

Actual behaviour

The file isn’t written to the volume. This causes the application (Alfresco to not start). However, there are files that are written to the mount.
It works when not mounting the volume, keeping the data inside the container.

Information

The application is a Java web app (Alfresco). It tries to load a file on startup. In the log you will see that it cannot find the file:

SEVERE: Failed to load keystore type JCEKS with path /alfresco/alf_data/keystore/ssl.keystore due to /alfresco/alf_data/keystore/ssl.keystore (No such file or directory)
java.io.FileNotFoundException: /alfresco/alf_data/keystore/ssl.keystore (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)

Steps to reproduce the behavior

I encountered this on a private image of mine, but I can reproduce it as well with a public image:

$ docker run --name alfresco_issue -d -v "/local/alf_data:/alfresco/alf_data" gui81/alfresco:latest

$ docker exec -it alfresco_issue bash

$ head -n 20 /alfresco/tomcat/logs/catalina.out

You will see in the output of the last command that the error occurred.


(Dave Tucker) #2

I can see a couple of issue here.

The first one is with the -v, please see the docs

I’ve tested with:

docker run --name alfresco_issue -d -v `pwd`/local/alf_data:alfresco/alf_data gui81/alfresco:latest

and I still see the same issue.

See https://github.com/gui81/docker-alfresco/issues/2 and https://github.com/gui81/docker-alfresco/issues/7 as this appears to be an issue with the image and not with Docker for Mac!

Thanks for participating in the beta!