recvtty is a reference implementation of a consumer of runC's --console-socket API. It is automatically built when doing a make on the runc project.
These instructions were tested on Ubuntu 16.04. Also go, git are required.
go get github.com/opencontainers/runc
cd $GOPATH/src/github.com/opencontainers/runc
make all # make tests will build the recvtty test tool and make install will install runc
# create the top most bundle directory
mkdir /mycontainer
cd /mycontainer
# create the rootfs directory
mkdir rootfs
# export busybox via Docker into the rootfs directory
sudo docker export $(sudo docker create busybox) | tar -C rootfs -xvf -
# Create config.json
runc spec
contrib/cmd/recvtty/recvtty ~/test.sock
cd mycontainer
sudo runc create --console-socket ~/foo.sock hello
sudo runc start hello