安装ubuntu镜像
docker pull ubuntu
启动ubuntu
docker run -ti ubuntu /bin/bash
进入shell-
在ubuntu中安装subversion
1)apt-get update
2)apt-get install nano
3)修改ubuntu的下载源nano /etc/apt/sources.list
用阿里的替换deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
4)安装subversion
apt-get install subversion
建好svn仓库,设置参数,参考 Ubuntu使用svn
将本container保存为docker的镜像,不保存的话前面安装配置的东西就都丢失了
docker commit 1979cf3371fb(确认好container的id) ubuntu-svn
启动刚保存的ubuntu-svn镜像
docker run -ti -p 3691:3690 ubuntu-svn sh -c "svnserve -d -r /svn && /bin/bash"
-p 3691:3690是把svn的默认端口3690映射给宿主机
sh -c 用于执行多条命令, 要先启用svn服务,然后进到shell-
宿主机访问docker中的svn服务
确认docker的ip
svn://10.0.75.1:3691/project
docker的ubuntu的镜像中安装SVN并使用
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 国内有很多Ubuntu的镜像源,包括阿里的、网易的,还有很多教育网的源,比如:清华源、中科大源。我们这里以中科大的...
- 安装Ubuntu18.04后,使用国外源太慢了,修改为国内源会快很多。 修改阿里源为Ubuntu 18.04默认的...