Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker container sharing clipboard with host

I searched a bit on google but got no useful results.

I'm finishing dockerizing vim and a common problem showed up: its container just won't share the clipboard with the host.

I am used to building vim with +clipboard, and to being able to yank text and have it available to the host, or copying text in host and pasting in vim...

I thought about making -v volumes that would share this data but I still got nowhere.

I'm on Ubuntu 16.10.

like image 226
Niloct Avatar asked Jan 17 '17 17:01

Niloct


Video Answer


1 Answers

The clipboard is almost certainly part of X, so you'll need to give the container access with:

docker run -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix your_image
like image 199
BMitch Avatar answered Oct 20 '22 03:10

BMitch