1.卸載現有docker:apt-get remove docker docker-engine docker.io 2.安裝:apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common 3.curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 4.apt-key fingerprint 0EBFCD88 5.add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" 6.apt-get update 7.apt-get install docker-ce
備註:
自定義網絡linux
docker network create --subnet 10.136.22.0/24 cnpro
查看建立的網橋web
docker network ls
docker
常見docker使用:ubuntu
docker run -d --name test \ --privileged --restart=always \ --net uspro --ip 172.31.3.11 \ -v /opt/app/test:/usr/local/tomcat/webapps/ROOT \ -v /opt/app/logs/test:/usr/local/tomcat/logs \ -v /storage:/storage \ -p 8081:8080 \ tomcat:8.0
參考官網:https://docs.docker.com/install/linux/docker-ce/ubuntu/#docker-ee-customerstomcat