관리자 전환
sudo -i
도커설치
apt install doker.io
업데이트 때문에 문제가 발생하면
reboot를 눌러서해결
톰켓검사
doker search tomcat
톰켓 시작 tc는 그냥 이름
docker run -d -p 8080:8080 --name tc consol/tomcat-7.0
주소창에 127.0.0.1:8080
도커 명령어로 검색
sudo docker search tomcat
MySQL Pull 하기
docker pull mysql
가지고 있는 이미지를 확인하는 명령어
docker images
실습 log
server1@server1-VirtualBox:~$ sudo -i
[sudo] server1의 암호:
root@server1-VirtualBox:~# apt install docker.io
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
패키지 docker.io는 이미 최신 버전입니다 (20.10.2-0ubuntu1~18.04.2).
0개 업그레이드, 0개 새로 설치, 0개 제거 및 513개 업그레이드 안 함.
root@server1-VirtualBox:~# docker tomcat
docker: 'tomcat' is not a docker command.
See 'docker --help'
root@server1-VirtualBox:~# docker searchtomcat
docker: 'searchtomcat' is not a docker command.
See 'docker --help'
root@server1-VirtualBox:~# docker search tomcat
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
tomcat Apache Tomcat is an open source implementati… 3070 [OK]
tomee Apache TomEE is an all-Apache Java EE certif… 91 [OK]
dordoka/tomcat Ubuntu 14.04, Oracle JDK 8 and Tomcat 8 base… 57 [OK]
consol/tomcat-7.0 Tomcat 7.0.57, 8080, "admin/admin" 18 [OK]
cloudesire/tomcat Tomcat server, 6/7/8 15 [OK]
aallam/tomcat-mysql Debian, Oracle JDK, Tomcat & MySQL 13 [OK]
arm32v7/tomcat Apache Tomcat is an open source implementati… 11
andreptb/tomcat Debian Jessie based image with Apache Tomcat… 10 [OK]
maluuba/tomcat7-java8 Tomcat7 with java8. 6
rightctrl/tomcat CentOS , Oracle Java, tomcat application ssl… 6 [OK]
unidata/tomcat-docker Security-hardened Tomcat Docker container. 5 [OK]
arm64v8/tomcat Apache Tomcat is an open source implementati… 3
amd64/tomcat Apache Tomcat is an open source implementati… 3
jelastic/tomcat An image of the Tomcat Java application serv… 2
cfje/tomcat-resource Tomcat Concourse Resource 2
oobsri/tomcat8 Testing CI Jobs with different names. 2
fabric8/tomcat-8 Fabric8 Tomcat 8 Image 2 [OK]
camptocamp/tomcat-logback Docker image for tomcat with logback integra… 1 [OK]
picoded/tomcat7 tomcat7 with jre8 and MANAGER_USER / MANAGER… 1 [OK]
ppc64le/tomcat Apache Tomcat is an open source implementati… 1
chenyufeng/tomcat-centos tomcat基于centos6的镜像 1 [OK]
99taxis/tomcat7 Tomcat7 1 [OK]
s390x/tomcat Apache Tomcat is an open source implementati… 0
softwareplant/tomcat Tomcat images for jira-cloud testing 0 [OK]
secoresearch/tomcat-varnish Tomcat and Varnish 5.0 0 [OK]
root@server1-VirtualBox:~# docker run -d -p 8080:8080 --name consol/tomcat-7.0
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
root@server1-VirtualBox:~# docker run -d -p 8080:8080 --name tc consol/tomcat-7.0
Unable to find image 'consol/tomcat-7.0:latest' locally
latest: Pulling from consol/tomcat-7.0
Image docker.io/consol/tomcat-7.0:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at <https://docs.docker.com/registry/spec/deprecated-schema-v1/>
e5ad7970bc69: Pull complete
a3ed95caeb02: Pull complete
d1bc08d19aa0: Pull complete
e4b877670a03: Pull complete
7fe52da169a9: Pull complete
dd8c3151a5a5: Pull complete
70eb33b1a032: Pull complete
878a118528b8: Pull complete
1c0747c147d5: Pull complete
0d0d0f226ce8: Pull complete
56357e7ea3fa: Pull complete
3c3554f7c62d: Pull complete
23de17079739: Pull complete
Digest: sha256:8256b5e8e01fc4f6c1913e1fd70dea95ae656400f70fb1c12157d0e89e1ccaf7
Status: Downloaded newer image for consol/tomcat-7.0:latest
9e15e9a94ecc213fddfb57afd3bce1f791255e1de80b852c155096d5f841e8fe
root@server1-VirtualBox:~# docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
b4d181a07f80: Pull complete
a462b60610f5: Pull complete
578fafb77ab8: Pull complete
524046006037: Pull complete
d0cbe54c8855: Pull complete
aa18e05cc46d: Pull complete
32ca814c833f: Pull complete
9ecc8abdb7f5: Pull complete
ad042b682e0f: Pull complete
71d327c6bb78: Pull complete
165d1d10a3fa: Pull complete
2f40c47d0626: Pull complete
Digest: sha256:52b8406e4c32b8cf0557f1b74517e14c5393aff5cf0384eff62d9e81f4985d4b
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest
root@server1-VirtualBox:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql latest 5c62e459e087 3 weeks ago 556MB
consol/tomcat-7.0 latest 7c34bafd1150 6 years ago 601MB