系统吧 专业的电脑操作系统,支持重装各种原版系统xp/win7/win8/win10 这个系统怎么样?试试系统吧系统,体验办公系统畅快愉悦感。 各种电脑系统安装过程一样,神一般的畅快!
-->
当前位置:主页 > 电脑技术 >

dockce启动httpd+git

作者:朱诗柔 分类:电脑技术 发布时间:2021-07-10 04:40:00

一、说明: conf目录下:主要copy的文件时httpd.conf,主要是配置apache可以访问到git并通过账号密码控制git-team.htpasswd: 这个文件提供了初始化的用户,主要包含两个,分别是usertest/admin[附件:httpd.conf] [附件:git-team.htpasswd] 二、创建DockerFile FROM centos:centos7MAINTAINER Imagine Lin ENV SSH_PASSWORD=P@ssw0rdCOPY git-team.htpasswd /opt/http_git/gitpasswd/git-team.htpasswdRUN yum -y install git wget vim net net-tools grep awk sed exec httpd-2.4.6 httpd-devel-2.4.6 httpd-tools-2.4.6 \mkdir -p /opt/http_git/ud.git \cd /opt/http_git/ud....

一、说明:

conf目录下:主要copy的文件时httpd.conf,主要是配置apache可以访问到git并通过账号密码控制git-team.htpasswd: 这个文件提供了初始化的用户,主要包含两个,分别是usertest/admin[附件:httpd.conf]

[附件:git-team.htpasswd]

二、创建DockerFile

FROM centos:centos7MAINTAINER Imagine LinENV SSH_PASSWORD=P@ssw0rdCOPY git-team.htpasswd /opt/http_git/gitpasswd/git-team.htpasswdRUN yum -y install git wget vim net net-tools grep awk sed exec httpd-2.4.6 httpd-devel-2.4.6 httpd-tools-2.4.6 && \mkdir -p /opt/http_git/ud.git && \cd /opt/http_git/ud.git && \git init --bare && \chown -R apache:apache /opt/http_git && \chown apache:apache /opt/http_git/gitpasswd/git-team.htpasswd && \chmod 640 /opt/http_git/gitpasswd/git-team.htpasswd COPY conf /etc/httpd/confEXPOSE 80CMD ["/usr/sbin/httpd","-D","FOREGROUND"]

三、构建镜像

#uyw-git: 是镜像名称。1.0是tag名称docker build -t uyw-git:1.0 .

四、运行镜像

docker run -d -it -p 10000:80 --name uyw-git -v dataVolumeGit1:/opt/http_git/gitpasswd uyw-git:1.0

xp 更多>>
win7 更多>>
win8 更多>>
win10 更多>>
U盘 更多>>
电脑技术 更多>>
网站地图 | 豫ICP备2021035069号-4 | 友情链接qq:191064436
系统吧

版权所有 © 2012-2023 系统吧 免责声明:本站资源均收集于互联网,其著作权归原作者所有,如果有侵犯您权利的资源,请来信告知,我们将及时删除相应资源。