0%
CentOS/RHEL 下载 Docker 源文件
1
| wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
|
把软件仓库地址替换为腾讯源
1
| sudo sed -i 's+download.docker.com+mirrors.cloud.tencent.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
|
安装 Docker
1 2
| sudo yum makecache fast sudo yum install docker-ce
|
修改 Dokcer 镜像仓库地址
1 2
| mkdir /etc/docker vim /etc/docker/daemon.json
|
添加以下内容:
1 2 3 4 5
| { "registry-mirrors": [ "https://docker.mirrors.ustc.edu.cn/" ] }
|
重启 Docker
1
| systemctl restart docker
|
image
gitlab
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| # gitlab docker pull gitlab/gitlab-ce
docker run --detach \ --hostname gitlab.gg \ --publish 443:443 --publish 80:80 --publish 8022:22 \ --name gitlab \ --volume $GITLAB_HOME/config:/etc/gitlab \ --volume $GITLAB_HOME/logs:/var/log/gitlab \ --volume $GITLAB_HOME/data:/var/opt/gitlab \ --shm-size 256m \ gitlab/gitlab-ce docker logs -f gitlab
docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
|
mysql
1
| docker run -itd --name mysql --hostname mysql.gg -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456.root mysql
|
redis
1
| docker run -itd --name redis --hostname redis.gg -p 6379:6379 redis
|