安装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默认的...