cassinyio/SwarmSpawner

mount type bind doesn't accept {username}

MAliNaqvi opened this issue · 1 comments

for mount with type 'bind' we can't add template via {username}, which doesn't permit any user specific isolation.

This code allows user specific isolation and templating with {username} for docker volumes:
https://github.com/cassinyio/SwarmSpawner/blob/master/cassinyspawner/swarmspawner.py#L302-L303

It can be used for mounting directories with template usernames for mount type with a very simple addition

https://www.dropbox.com/s/qx8u6e1p9aaa7f0/Screenshot%202017-03-23%2019.35.04.png?dl=0

its actually not a complete solution, because one has to create the hashed usernames apriori, which wouldn't make sense in a production setting where if an oauthenticator is used there can be many users and we can't know the names of all beforehand.

This one is fixed @barrachri.