大网数据广告活动
服务器运维问答

coreos mount cifs or sshfs or any other networked file system

· 52CE 我爱测

For development I want to mount a file share from my windows dev box inside my CoreOS VM, so I can then mount that volume inside a container. CoreOS doesn't appear to support doing this, and comes with no package manager; the ide…

问题原文

原帖链接 · Mark · CC BY-SA 3.0

For development I want to mount a file share from my windows dev box inside my CoreOS VM, so I can then mount that volume inside a container.

CoreOS doesn't appear to support doing this, and comes with no package manager; the idea being it is only a minimalist host for containers.

$ cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   ramfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cpuset
nodev   tmpfs
nodev   devtmpfs
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   pipefs
nodev   devpts
nodev   hugetlbfs
nodev   pstore
nodev   mqueue
nodev   autofs
        ext3
        ext2
        ext4

I can mess around with the container and mount it from within the container but I was having trouble getting that setup via Dockerfiles and entrypoint scripts; also that approach feels hacky: Containers shouldn't worry about where the data is stored, they just ask for a volume. In production I'd be using AWS storage or Azure storage, etc, so I'd have to modify my images for different host AND i can't use the official images.

So yeah I'm 99 percent sure I need to mount it within the CoreOS host, but don't know how to do it.

已采纳解答

原帖链接 · spuder · CC BY-SA 3.0

The fundamental principles of containers is that they should be portable and completely self contained. It should not have any external dependencies that are environment specific, (like a specific network share).

Instead of making your container inside CoreOS, you should build your container on a dedicated build host which has access to the network share. All files that are needed by the container should then be encapsulated inside the container, or a volume container and pushed to CoreOS using the docker registry.

CoreOS isn't really meant for development work. It is meant to be used for deployments. You may find vagrant gives a better workflow since it can mount volumes between the host and the guest.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-06-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。