Plone-backend - Identical docker image fails on one machine and works on another

This is for development, I'm mounting a volume and using the DEVELOP option for plone-backend

The command looks like this:

docker run -p 8080:8080  -e SITE="Plone"  -e DEVELOP="/app/src/site.content 
/app/src/txbizlaw.profile" -e ADDONS="collective.easyform collective.exportimport" -e TYPE="classic" -e PROFILES="site.profile:default collective.easyform:default"  -v $(pwd)/src:/app/src  -v 
$(pwd)/var/import:/app/import plone/plone-backend:6.0.0a6

My site.content includes xml models for the content.

While it works on one machine, the docker command fails when Plone/LXML tries to parse one of the xml models.

plone.supermodel.parser.SupermodelParseError: Error reading file 
'/app/src/site.content/src/site/content/content/blog_post.xml': failed to load external entity 

Both machines are using plone/plone-backend 6.0.0a6

plone/plone-backend 6.0.0a6 ec367d693c66

same hash and yet one gives the error above and other does not.

It was bothering me that two "identical" setups would behave differently so I did the following on the machine that was not working as expected:

Cleaned up /var/lib/docker in case there was some corruption.

service stop docker
rm -rf /var/lib/docker/*
service start docker

Still no difference.

What fixed it was re-uploading the source files that are mounted at startup by my docker command.
It seems that my site.content folder was corrupted during transfer over to the machine.
The re-upload resolved the issue.

This makes sense, docker is supposed to provide a repeatable environment, the variation was introduced by the files that get mounted.

1 Like