简体   繁体   English

Docker安装套接字卷

[英]Docker mount socket volume

In a docker container I want to mount a volume_from an other with a Linux Socket, the question sticks on the way it works in background. 在一个Docker容器中,我想使用Linux Socket从另一个容器中安装一个volume_,问题依旧在于它在后台的工作方式。

AFAIK Linux sockets are memory only but once mounted on an other container does it work as so or somehow it uses IO? AFAIK Linux套接字仅是内存,但是一旦安装在其他容器上,它是否可以正常工作或以某种方式使用IO?

thanks. 谢谢。

AFAIK Linux sockets are memory only AFAIK Linux套接字仅用于内存

I don't think this is true. 我不认为这是真的。 The socket descriptor might be identified differently than a regular file. 套接字描述符的标识可能不同于常规文件。 But the reading and writing should be the same as a file, so mounted volumes sharing that descriptor should work just as they do for a file. 但是读取和写入应该与文件相同,因此共享该描述符的已装入卷应像对文件一样工作。 If both containers can read/write to that file descriptor then they should both be able to read/write when it is a socket descriptor as well. 如果两个容器都可以读取/写入该文件描述符,那么当这两个容器都是套接字描述符时,它们都应该都可以读取/写入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM