Docker快速搭建docker-nfs-server服务器
转载来源:https://hub.docker.com/r/fuzzle/docker-nfs-server/
Docker快速搭建docker-nfs-server服务器
docker-nfs-server
to start
docker run -d --privileged --restart=always \
-v /tmp:/nfs \
-e NFS_EXPORT_DIR_1=/nfs \
-e NFS_EXPORT_DOMAIN_1=\* \
-e NFS_EXPORT_OPTIONS_1=ro,insecure,no_subtree_check,no_root_squash,fsid=1 \
-p 111:111 -p 111:111/udp \
-p 2049:2049 -p 2049:2049/udp \
-p 32765:32765 -p 32765:32765/udp \
-p 32766:32766 -p 32766:32766/udp \
-p 32767:32767 -p 32767:32767/udp \
fuzzle/docker-nfs-server:latest
volumes
You will need to provide the container with the volume(s) that you want to expose via nfs
-v <local path>:<path in container>
environment variables
You will need to provide at the following 3 environment variables to configure the nfs exports:
- NFS_EXPORT_DIR_1
- NFS_EXPORT_DOMAIN_1
- NFS_EXPORT_OPTIONS_1
When the container is started, the environment variables are parsed and the following output is created in /etc/exports file:
NFS_EXPORT_DIR_1 NFS_EXPORT_DOMAIN_1(NFS_EXPORT_OPTIONS_1)
for the example given the following line in /etc/exports would be created:
/nfs *(ro,insecure,no_subtree_check, no_root_squash, fsid=1)
To define multiple exports, just increment the index on the environment variables
build command
docker build -t fuzzle/docker-nfs-server:v1 .
inspect running container
docker exec -ti CONTAINER bash
mounting the nfs share from another host
mount -v -t nfs -o ro,nfsvers=3,nolock,proto=udp,port=2049 <ip_address_docker_host>:/nfs /mnt/scratch
Todo
- There seems to be a bug on systems with ipv6 disabled kernels/configs: have a look at the mailing list
- should be fixed with nfs-utils-1.3.4
- eliminate --privileged mode, have a look ...
- here
- and here
- Setup automated build
- Automated Builds
Docker快速搭建docker-nfs-server服务器相关推荐
- Docker快速搭建TeamSpeak多人语音聊天服务器
Docker快速搭建TeamSpeak多人语音聊天服务器 第一步执行: git clone https://github.com/overshard/docker-teamspeak cd docke ...
- Docker快速搭建邮件服务器Modoboa
转载来源:https://hub.docker.com/r/flavioaiello/modoboa/dockerfile Docker快速搭建邮件服务器Modoboa DockerFile: FRO ...
- 阿里云服务器如何快速搭建Docker环境
本教程介绍如何使用阿里云服务器快速搭建Docker环境,并使用Docker部署一个Nginx服务. 步骤一:安装Docker CE Docker有两个分支版本:Docker CE和Docker EE, ...
- 基于阿里云ECS弹性云服务器快速搭建Docker环境
基于ECS快速搭建Docker环境 什么是docker? Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也 ...
- 【Microsoft Azure 的1024种玩法】六十八.基于Azure云平台使用Azure Virtual machines快速搭建Docker容器
[简介] Docker 是一个开放源代码软件,主要应用于开发应用.交付应用.运行应用,Docker 可以将应用程序及其依赖项打包到可以在任何 Linux.Windows 或 macOS 计算机上运行的 ...
- Docker快速搭建Taiga敏捷开发项目管理平台
Taiga.io , Open Source, full featured project management platform for startups and agile developers ...
- 五分钟用Docker快速搭建Go开发环境
挺早以前在我写过一篇用 Docker搭建LNMP开发环境的文章:用Docker搭建Laravel开发环境,里面详细介绍了将 nginx. mysql和 php三个容器用 docker-compose编 ...
- docker容器没有apt_使用Docker快速搭建Rails开发环境
引言 Docker with rails 学习 Ruby On Rails 开发的同学经常会遇到因为电脑系统环境不同,同样的程序在自己这边跑起来没问题,给了其他人之后就是各种依赖或者环境问题,尤其是在 ...
- docker mysql 操作_[Docker] Docker 快速搭建本地MySQL开发环境
[Docker] Docker 快速搭建本地MySQL开发环境 关于 Docker 的安装使用本文不再赘述,有兴趣的可以通过官网或是浏览我的专栏文章了解.今天着重给大家介绍下如何利用Docker快速搭 ...
最新文章
- 这篇实战攻略,带你轻松入门Elastic search
- Confluence 6 文档主题合并问答
- 域名解析服务查询工具dnstracer
- JavaScript多文件下载
- Spring对JNDI的支持方法
- Makefile的介绍与使用
- iotop命令监控磁盘io
- java if 并列_Java 并列if语句,一个判断失败后,后面的if就不执行了,为什么啊?...
- 语音识别软件哪个好?好用的语音识别软件盘点
- chkconfig命令详解
- 柳神(柳婼)PAT甲级题目链接
- 【笔记】QCA9531无线校准
- 青岛科技大学计算机转专业,2021年青岛科技大学大一新生转专业及入学考试相关规定...
- flvplayer.swf flv视频播放器使用方法 (转载)
- 对2-9取余的计算方法
- 【Android折叠屏适配】基于AutoSize框架适配折叠屏并兼容多窗口模式
- VMware在线添加磁盘
- 空旷的室外如何安装摄像头?室外线缆布置十项细则
- Alibaba iOS 工程架构腐化治理实践
- oracle中dba什么意思,oracle dba
热门文章
- Google adwords新手推广常见错误
- SEO之Google--PageRank优化剖析(一)
- Linux Shell高级技巧(五)
- 使用Tool Bar切换视图
- Elasticsearch整理笔记(五)
- 背包——变向背包(hdu2546,1114,1203,2189)
- 【编码问题】‘utf-8‘ codec can‘t decode byte 0xce in position 0
- SpringBoot—启动报错Exception in thread “main“ java.lang.ClassNotFoundException
- 学习日报 1028 分支结构 if分支语句
- 爬虫-发起post请求-稿件