docker-meteor icon indicating copy to clipboard operation
docker-meteor copied to clipboard

Package catalog for dev container

Open Maxim-Filimonov opened this issue 9 years ago • 9 comments

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.

Maxim-Filimonov avatar Feb 27 '15 01:02 Maxim-Filimonov

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.

DanielDent avatar Mar 02 '15 02:03 DanielDent

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 :(

Maxim-Filimonov avatar Mar 02 '15 04:03 Maxim-Filimonov

Closing for now as i won't be able to use it in near future anyway

Maxim-Filimonov avatar Mar 02 '15 05:03 Maxim-Filimonov

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 avatar Mar 02 '15 06:03 DanielDent

@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?

Maxim-Filimonov avatar Mar 02 '15 12:03 Maxim-Filimonov

That would be great!

DanielDent avatar Mar 03 '15 01:03 DanielDent

@DanielDent -> https://github.com/DanielDent/docker-meteor/pull/4

Maxim-Filimonov avatar Mar 04 '15 23:03 Maxim-Filimonov

Does it work even if we use the "vboxsf-shim" ? I don't think so, right ?

yvann avatar Apr 23 '15 03:04 yvann

@yvann dunno i'm using vmware fusion :\

Maxim-Filimonov avatar Apr 23 '15 03:04 Maxim-Filimonov