oduwsdl / tmvis

An archival thumbnail visualization server
MIT License
7 stars 7 forks source link

What is "CONTAINER ID CREATED ABOVE"? #73

Closed machawk1 closed 4 years ago

machawk1 commented 4 years ago

The instructions for running this using Docker reference what I assume is a placeholder stating, "(CONTAINER ID CREATED ABOVE)". From where does a user get this value? The README is unclear on this.

ibnesayeed commented 4 years ago

Docker related documentation is messy and needs a rework.

machawk1 commented 4 years ago

@ibnesayeed Is the intended ID needed here the same one that corresponds to the container launched as revealed using docker ps?

ibnesayeed commented 4 years ago

Yes, I think so. It looks like they are trying to copy the node_modules from the image that was built earlier into the local development folder and then mount it back in a subsequent container. You can get that container ID from the docker container ls command (or use the randomly generated name in place of ID). You can also get that ID from the Bash prompt of the container. This can be avoided by giving a custom name to the container using --name tmvis_modules argument and then use tmvis_modules (or any other name) in place of the container ID.

This whole thing can be redone to eliminate the need of copying node_modules folder and streamline other things.

dhruv282 commented 4 years ago

@ibnesayeed how do you suggest for this to be redone without the need of copying node_modules? I've thought of moving node_modules to / so the host can be mounted to /app however I'm having issues implementing this approach. Thanks!

ibnesayeed commented 4 years ago

There are just way too many unnecessary steps and hacks in the documentation. You can simply have a usual docker image build command followed by docker container run command. For development environment where dost machines files need to be inside without node_modules folder of the image being overwritten inside of the container with what is on the host, one can simply add yet another volume for that. This means, in the final docker run command we can add -v /app/node_modules after -v "$PWD":/app. #TheMagicHappens! ;-)

If you need more help on this and refactoring the documentation, you may discuss the matter in our Slack.