OneZoom / OZtree-docker

A set of scripts that generate a fully functional docker image of the OneZoom software
Other
3 stars 1 forks source link

Saving the container with bespoke images doesn't work #1

Open hyanwong opened 2 years ago

hyanwong commented 2 years ago

According to the instructions, after running add_bespoke_images.py, which copies thumbnail images into static/FinalOutputs/img/1/xxx, I should be able to do

docker commit --change="CMD /sbin/my_init" running_onezoom onezoom/oztree-bespoke-images-with-iucn

to save a docker image with these thumbnails in the right dir. However, when I do this, and re-run the new image with docker run -v -p 8080:80 onezoom/oztree-bespoke-images-with-iucn all the images in static/FinalOutputs/img are gone. You can verify this by creating a directory by hand within the docker image in e.g. static/FinalOutputs/ then running the docker commit command. When the committed container is restarted, it won't have the hand-created directory.

I'm sure I'm misunderstanding how docker commit works here. I wonder if @lentinj has any clue what I should be doing to persist a user's local changes in a new docker container in an easy way.

lentinj commented 2 years ago

It's not something I've used before, but reading the docs it does sound like it should do what you want it to.

Another option would be to have an external volume for ICUN image storage, which the docker image can populate if it isn't already. That seems like it's the more docker-ish way to do it anyway.