I was setting up a CI build machine. Builds were supposed to be ran in disposable containers, but I needed a way to trigger a task on the host from inside the container. I didn't want to give containers shell access to host - kinda misses the point.

Solution: a server running on the host and listening for predefined commands on a named pipe. The pipe was bound into containers which would simply echo commands into it. Very simple and effective.

The hacky part? The server was an 8-line bash script.

  • 2
    Why make it more complicated than necessary, bash has quite easy to use pipe support :P
Add Comment