News for hackers. Stuff that matters.
Re:Dockersh – a shell that puts users into individual docker... by scintill76 on Wednesday August 27, 2014 @12:51AM (#8230896)
> This allows you to have a single ssh process on the normal ssh port which places user sessions into their own individual docker containers in a secure and locked down manor.

Funniest instance of this misused homonym I've seen.

Re:Dockersh – a shell that puts users into individual docker... by StavrosK on Wednesday August 27, 2014 @06:02AM (#8231429)
It's more of a stately home, really.
Re:Dockersh – a shell that puts users into individual docker... by teh_klev on Wednesday August 27, 2014 @07:52AM (#8231676)
Or "tax" raising locale in east end London gangster parlance.
Re:Dockersh – a shell that puts users into individual docker... by kaoD on Wednesday August 27, 2014 @10:06AM (#8232135)
Isn't that actually a homophone?
Re:Dockersh – a shell that puts users into individual docker... by scintill76 on Wednesday August 27, 2014 @10:55PM (#8235723)
Ah, I've been out-pedanted. Yeah, I realized a while after posting. Looking at Wikipedia and some dictionaries, it looks like homonym doesn't always imply same spelling. Homophone would be more correct though.
Re:Dockersh – a shell that puts users into individual docker... by epistasis on Wednesday August 27, 2014 @02:07AM (#8231002)
Seems like an almost literary use!
Re:Dockersh – a shell that puts users into individual docker... by jdrago999 on Wednesday August 27, 2014 @02:59AM (#8231077)
Please explain!
Re:Dockersh – a shell that puts users into individual docker... by leeoniya on Wednesday August 27, 2014 @03:24AM (#8231122)
manor vs manner
Re:Dockersh – a shell that puts users into individual docker... by donw on Wednesday August 27, 2014 @04:54AM (#8231307)
I'm not sure if this is related -- because it doesn't require Docker or Linux -- but I've got a small shell tool for transparent development on remote machines. Gives you the ability to do something similiar (`ws shell`), and drop directly into the remote environment you're working in.

I use it to work on my Mac, but develop on a Linux box:

https://github.com/matadon/workspace

Re:Dockersh – a shell that puts users into individual docker... by rurounijones on Wednesday August 27, 2014 @01:00AM (#8230906)
With a name like that I hope the patron saint of Dockersh is Sean Connery
Re:Dockersh – a shell that puts users into individual docker... by heavenlyhash on Wednesday August 27, 2014 @10:24AM (#8232241)
To shamelessly plug a much more minimalist solution, https://github.com/polydawn/siphon-cli can also give you new shells shells inside existing containers (or whatever; it's more like screen than anything tightly bound to docker).

Siphon does nothing but create and forward psuedoterminals, so it has a lot less features to directly interact with docker than dockersh appears to have, but it's also able to do its job without root or any priviledged syscalls, and doesn't rely on any knowledge of kernel namespaces at all. Which is more useful may depend on your perspective and usecases.

Re:Dockersh – a shell that puts users into individual docker... by TeMPOraL on Wednesday August 27, 2014 @09:54AM (#8232076)
Interesting. I'll take some time to learn it over the weekend. Right now at work I use the following solution to keep a shell running on containers:

https://gist.github.com/TeMPOraL/3d134ce0d4a2b2f4232b

Basically, it starts a screen instance with a shell and your script running side by side, so when you Docker-attach to it, you can C-a " to shell.

run.sh would be the script you want to be run in container - the one that starts your webserver, database, whatever.

I adapted a screen solution from some random StackOverflow comment.

Re:Dockersh – a shell that puts users into individual docker... by rwmj on Wednesday August 27, 2014 @03:40AM (#8231157)
Pretty similar to libvirt sandbox (done about 4 years ago):

http://sandbox.libvirt.org/quickstart/

Libvirt sandbox can also put processes, jobs, users etc into real VMs as well as chroots ^W containers.

Re:Dockersh – a shell that puts users into individual docker... by Terretta on Wednesday August 27, 2014 @10:20AM (#8232207)
> Pretty similar to libvirt sandbox (done about 4 years ago):

Or how we ISPs gave dialup modem users their own login shells in mid 1990's:

http://www.freebsd.org/cgi/man.cgi?query=jail

I can't find docs for the chroot shell we used back then, but what we did was along the same lines as this:

http://www.aarongifford.com/computers/chrsh.html

Re:Dockersh – a shell that puts users into individual docker... by thu on Wednesday August 27, 2014 @04:25AM (#8231248)
The point is not containerization with Docker (vs. something else), but showing a project that can be used as a login shell. I.e. I think a good chunk of the challenge was gluing everything from sshd to the running individual containers.

Even if you were saying that such a login shell already exists with another containerization scheme, the fact it uses Docker is relevant to those who are investing in Docker. For instance Dockersh can be configured to run the shell in a specific Docker image; that is you can re-use your existing knowlegde and tooling.

Re:Dockersh – a shell that puts users into individual docker... by korzun on Wednesday August 27, 2014 @11:16AM (#8232541)
I'm not sure if any shell hosting providers post here. I operate one of the companies in this space since 2001.

This is a fun alternative to proper jails but unfortunately, security wise this would not last very long on in a real world application.

Not going to lie, would be pretty cool to set something like this up and auto provision upon payment.

Re:Dockersh – a shell that puts users into individual docker... by duskwuff on Wednesday August 27, 2014 @04:09PM (#8234468)
Which provider? Curious.
Re:Dockersh – a shell that puts users into individual docker... by korzun on Thursday August 28, 2014 @12:40PM (#8238182)
http://www.amdwebhost.com

Yes, design is outdated. This was great at the time; people were still using tables for layouts.

Re:Dockersh – a shell that puts users into individual docker... by bertoluci on Wednesday August 27, 2014 @10:32AM (#8232301)
I've been using Firejail for this purpose:

http://l3net.wordpress.com/2014/04/16/how-to-restrict-a-logi...

Re:Dockersh – a shell that puts users into individual docker... by retr0h on Wednesday August 27, 2014 @12:37AM (#8230873)
I don't get it :/
Re:Dockersh – a shell that puts users into individual docker... by jacques_chester on Wednesday August 27, 2014 @07:31AM (#8231619)
Sometimes, during development or when fixing a deployed app, you want to get inside the container environment to poke around. Just to work out why the hell something did or didn't happen.

Right now it is difficult. Docker doesn't support it directly. There is a lot of demand for it:

https://github.com/docker/docker/issues/1228

You have to use nsenter, which is OK, but requires additional installation:

https://github.com/jpetazzo/nsenter

It looks as though an-almost-but-not-quite-the-same thing will land in Docker at some point:

https://github.com/docker/docker/pull/7409

And this shell is another attempt to make a very useful feature available.

Re:Dockersh – a shell that puts users into individual docker... by thu on Wednesday August 27, 2014 @07:39AM (#8231640)
Are you sure it is related to entering an existing container (and running a new process) ?

From reading the README file, it seemed to me it was only spawning a login shell process in a new container (not an existing one), and possibly resuming an existing container.

Re:Dockersh – a shell that puts users into individual docker... by StavrosK on Wednesday August 27, 2014 @10:19AM (#8232203)
You are correct, dockersh is a shell. It spawns a "proper" shell (e.g. bash) in a docker container when you log in.
Re:Dockersh – a shell that puts users into individual docker... by taylorbuley on Wednesday August 27, 2014 @10:09AM (#8232150)
I feel this docker pain. But isn't an isolated process the point? I thought I read an article here recently that said, basically, if you're running an ssh server in your proc then you're doing it wrong.
Re:Dockersh – a shell that puts users into individual docker... by jgrowl on Wednesday August 27, 2014 @10:32AM (#8232300)
I feel like having completely isolated processes is ideal but not always or even usually needed.

I know the phusion/baseimage argues against excessive isolation:

https://github.com/phusion/baseimage-docker#docker_single_pr...

Re:Dockersh – a shell that puts users into individual docker... by antocv on Wednesday August 27, 2014 @07:33AM (#8231623)
> This allows you to have a single ssh process on the normal ssh port which places user sessions into their own individual docker containers in a secure and locked down manner.

No! Warning!

Docker is not secure and locked down. Do not use this for "security".

Re:Dockersh – a shell that puts users into individual docker... by StavrosK on Wednesday August 27, 2014 @10:19AM (#8232198)
Sure, but it's secure enough for giving friends access to my laptop without them being able to look around the rest of the system.
Re:Dockersh – a shell that puts users into individual docker... by antocv on Thursday August 28, 2014 @08:13AM (#8236814)
GNU/Linux and ssh is already secure enough for that. File permissions, so they cant see your files.
Re:Dockersh – a shell that puts users into individual docker... by StavrosK on Thursday August 28, 2014 @08:41AM (#8236904)
They can't see the homedir, but they can still see config files and anything else that couldn't be conveniently locked down.
Re:Dockersh – a shell that puts users into individual docker... by milkshakes on Wednesday August 27, 2014 @11:26AM (#8232607)
just as long as you don't give them root...