onedev 搭建
OneDev是一个开源的一体化的DevOps平台,原生支持Docker, 详情详见 https://github.com/theonedev/onedev
#!/bin/bash
DATA_PATH=/opt/docker/1dev
HOST_PORT1=6610
HOST_PORT2=6611
docker run -dit --name 1dev --restart=unless-stopped \
-v ${DATA_PATH}:/opt/onedev \
-v /var/run/docker.sock:/var/run/docker.sock \
-p ${HOST_PORT1}:6610 \
-p ${HOST_PORT2}:6611 \
1dev/server
firewall-cmd --zone=public --permanent \
--add-port=${HOST_PORT1}/tcp \
--add-port=${HOST_PORT2}/tcp && \
firewall-cmd --reload
稍等片刻,可以使用 http://localhost:6610 访问。