docker-meteor
docker-meteor copied to clipboard
Package catalog for dev container
Hey, Thanks for the container, works great :+1: I'm not sure is it possible to solve as part of Dockerfile definition or a description needed to be added to README but I've noticed significant slow downs on startup of meteor app first time container is launched. See example for a very small app(only 5 packages including core):
> du -d0Hm ~/.meteor/
308944 /root/.meteor/
> meteor
.....
> du -d0Hm ~/.meteor/
334412 /root/.meteor/
As soon as I stop the container it will reset back to 308944 as expected. Which means EVERY time I start a dev container for this app it will try to build up cache again which results in significant extra download. Any ideas on how to fix it ? I've tried to mount ~/.meteor inside the container but it doesn't seem to work.
Thanks for the feedback.
The build process for this container does not do a package catalog update as I have not had time to investigate a way to do so while maintaining a demonstrably repeatable build process (which was one of my goals when I created this Docker image).
I think your concern is most easily resolved by dropping use of the --rm flag (and possibly also using the --name flag). This allows changes to persist.
Please let me know if you feel this addresses your use case. I would also welcome a pull request which improves the package's documentation to clarify this for other users.
I'm actually not running them directly but using docker-compose instead. Don't think I can control --rm there. I think maybe if I use data container for /home/root/.meteor/ it might fix the issue. We were blocked by velocity mirror magic from using docker anyway :(
Closing for now as i won't be able to use it in near future anyway
Another option would be for you to build a new Docker image using this one as a base. A very simple Dockerfile would do the trick: FROM danieldent/meteor RUN command_to_get_the_image_into_a_state_you_like
Then simply run your image rather than this one.
@DanielDent Great idea ! I've managed to hack it with the following Dockerfile
FROM danieldent/meteor
RUN npm install -g orion-cli
# This forces package-catalog update. Should speed up further runs
RUN meteor show meteor-platform
Do you want me to update the docs with that hint?
That would be great!
@DanielDent -> https://github.com/DanielDent/docker-meteor/pull/4
Does it work even if we use the "vboxsf-shim" ? I don't think so, right ?
@yvann dunno i'm using vmware fusion :\