Docker container sharing clipboard with host

本小妞迷上赌 提交于 2019-12-12 11:48:20

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/41703070/docker-container-sharing-clipboard-with-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!