docker 간이 자습서

1413 단어
docker 설치
1.sudo apt-get update
2.sudo apt-get install apt-transport-https ca-certificates
3.sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
4.echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" >> /etc/apt/sources.list.d/docker.list  
 5.sudo apt-get update
6.sudo apt-get install docker-engine

mysql 설치
sudo docker pull mysql:5.5    //   
sudo docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=445566 -d mysql:5.5 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
docker start mysql

tomcat 설치
sudo docker pull tomcat:7.0
sudo docker run -it --name tomcat -p 8080:8080 -d tomcat:7.0

//보기
$ docker ps -a

//삭제
$ sudo docker rm -f tomcat

//시작
$ sudo docker run -it --name tomcat -p 8080:8080 -d -v /data/docker/tomcat:/usr/local/tomcat/webapps   tomcat:7.0
$ sudo docker run -it --name tomcat -p 8080:8080 -d -v /data/docker/tomcat/ROOT:/usr/local/tomcat/webapps/ROOT   tomcat:7.0

좋은 웹페이지 즐겨찾기