Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images #2

Open
smashwilson opened this issue Dec 15, 2014 · 5 comments
Open

Images #2

smashwilson opened this issue Dec 15, 2014 · 5 comments

Comments

@smashwilson
Copy link
Member

Multyvac has a feature called a layer, which sounds an awful lot like a docker run followed by a docker commit.

@rgbkrk
Copy link
Member

rgbkrk commented Dec 17, 2014

That is interesting. Not sure how far I want to support that, from a security perspective with Docker. Do we really want to give root access out?

@smashwilson
Copy link
Member Author

Do we really want to give root access out?

Oh, right, they do grant root, which would probably be a bad idea. Weird.

This is totally out-of-scope for our initial sprint here, by the way, I just didn't want to lose the idea.

@smashwilson
Copy link
Member Author

💡 I wonder if we could build our container to run as non-root, but set up a virtualenv (for Python) so users could use pip and friends to build up layers?

Hmm, I bet multyvac hardcodes the root user in the ssh call, though.

@rgbkrk
Copy link
Member

rgbkrk commented Dec 19, 2014

As discussed in chat, we could use an image that includes conda and let them install the packages they need as non-root. Example (that runs as root), courtesy @elyase in https://github.com/elyase/docker/tree/master/conda/3.4:

FROM progrium/busybox
MAINTAINER Yaser Martinez Palenzuela
RUN opkg-install bash bzip2
ADD conda_install.sh /root/conda_install.sh
#ADD Miniconda3-3.7.3-Linux-x86_64.sh /root/miniconda3/Miniconda3-3.7.3-Linux-x86_64.sh
RUN ["bash", "/root/conda_install.sh"]
ENV PATH /root/miniconda3/bin:$PATH

Side note about this image:

We can't actually use busybox though, as it doesn't have the ability to add users (unless you build busybox with it).

Also, making a minimized base image in a multi-tenant system doesn't make sense because then everyone is building the same layers, resulting in more space rather than less. After installing numpy, scipy, ipython-notebook, scikit-learn there were 12304 files created or modified. The image ended up being 674.6 MB without even installing the rest of the scipy stack and that's only for Python 3. Across hundreds of users that 100*674.6MB of changes instead of just the 1 base layer shared across.

@smashwilson smashwilson changed the title Layers Images Jan 20, 2015
@smashwilson
Copy link
Member Author

We should call these "images" to be more familiar to Docker users who aren't familiar with multyvac, but accept "layer" as an alias so we maintain multyvac compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants