Ubuntu-16-.04-安装gitlab

apt update -y
apt upgrade -y
apt install -y docker docker.io
systemctl start docker
systemctl enable docker
docker pull gitlab/gitlab-ce

docker run --detach \
 --publish 80:80 --publish 443:443 --publish 2222:22 \
 --name gitlab \
 --restart always \
 --volume /srv/gitlab/config:/etc/gitlab \
 --volume /srv/gitlab/logs:/var/log/gitlab \
 --volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce



cat >/etc/docker/daemon.json<<EOF
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}
EOF
systemctl restart docker