如何加速docker下载镜像
登陆阿里,获取镜像加速地址,按操作修改镜像源
https://cr.console.aliyun.com/#/accelerator
docker安装mysql
http://www.runoob.com/docker/docker-install-mysql.html
查看镜像
docker images
查看容器
docker ps
或
docker ps -a
查看容器信息(ip等)
docker inspect [容器名称]
停容器
备份image和container
https://blog.csdn.net/a906998248/article/details/46236687
docker安装jenkins
https://blog.csdn.net/mmd0308/article/details/77206563?locationNum=6&fps=1
查看docker的某个容器的日志
docker logs [容器名称]
jenkins启动命令
sudo docker run -d --name enkins -p 8081:8080 -p 50000:50000 --volume $PWD/jenkins:/var/jenkins_home jenkins
本地端口映射成8081
[ludvikwoo ~/SoftwareData]$docker logs myjenkins
touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
sudo chown -R 1000 jenkins
然后重启
docker start myjenkins
http://127.0.0.1:8081/jenkins
打开 ip地址:8080 网页,按照提示
/var/jenkins_home/secrets/initialAdminPassword
在里面找到初始密码 要把/var/jenkins_home 换成 /home/jenkins_home
cat /home/jenkins_home/secrets/initialAdminPassword
按照对应的密码初始化,开始Jenkins的使用吧
docker安装redis
http://www.runoob.com/docker/docker-install-redis.html
网友评论