Ubuntu host docker ubuntu container clipboard(xsel or xclip) share between host and container

I’m using ubuntu 16.04 as docker host and running docker container(also ubuntu 16.04). Also editing codes use neovim via ssh connection to container.

But it’s really inconvenience to sharing yanked data between host/container. I can sharing yanked data among neovim instance easily in host ubuntu. But not in container.

I read an article about sharing clipboard between host/container as link below. But it does not work at all.

Docker container sharing clipboard with host

Any idea how to correctly set container environment to sharing yanked data?

I have xsel/xclip installed in docker container, but it just not work. Also, I’ve set DISPLAY environment variable in container as the article described.

Someone please help me to correct the setting. Thanks

1 Like


I am having the same problem.

Any solution yet?

Thank you.