Reputation: 103
I have a project needs to be containerized, but it has lots of dependencies. such as matlab runtime if I install run time in the image, the image size will almost get to 2g, there is another workaround is install matlab runtime on host machine, and pass the path as env variables. so in this case if I have lots of heavy dependencies where should I install them? host or in image? thanks.
Upvotes: 0
Views: 304
Reputation: 40306
Your container image should be self-contained and self-sufficient.
You should include the matlab runtime in the image.
One benefit of containers is that, there's almost perfect fidelity between running image X on machine A and machine B; if it works on A, it will work on B. This is because the container image is self-contained and assumes little beyond a Linux kernel and the container runtime.
If you were able to exclude dependencies as you describe, you'd be back with the classic application distribution problem of it working on some machines and not others because of variability between the machines' software.
Upvotes: 2