1. root 계정 접속
ljw@ljw:/$ sudo -i
[sudo] ljw의 암호:
root@ljw:~#
2. 검색 명령어 입력 or https://hub.docker.com 에서 검색
root@ljw:~# docker search tomcat
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
tomcat Apache Tomcat is an open source implementati… 2927 [OK]
tomee Apache TomEE is an all-Apache Java EE certif… 86 [OK]
dordoka/tomcat Ubuntu 14.04, Oracle JDK 8 and Tomcat 8 base… 55 [OK]
bitnami/tomcat Bitnami Tomcat Docker Image 37 [OK]
kubeguide/tomcat-app Tomcat image for Chapter 1 29
consol/tomcat-7.0 Tomcat 7.0.57, 8080, "admin/admin" 17 [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… 10
rightctrl/tomcat CentOS , Oracle Java, tomcat application ssl… 6 [OK]
maluuba/tomcat7-java8 Tomcat7 with java8. 6
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… 2
cfje/tomcat-resource Tomcat Concourse Resource 2
jelastic/tomcat An image of the Tomcat Java application serv… 2
ppc64le/tomcat Apache Tomcat is an open source implementati… 1
chenyufeng/tomcat-centos tomcat基于centos6的镜像 1 [OK]
camptocamp/tomcat-logback Docker image for tomcat with logback integra… 1 [OK]
picoded/tomcat7 tomcat7 with jre8 and MANAGER_USER / MANAGER… 1 [OK]
oobsri/tomcat8 Testing CI Jobs with different names. 1
99taxis/tomcat7 Tomcat7 1 [OK]
secoresearch/tomcat-varnish Tomcat and Varnish 5.0 0 [OK]
softwareplant/tomcat Tomcat images for jira-cloud testing 0 [OK]
3. 도커 이미지 다운, 컨테이너 생성, 실행 ( run )
-d 옵션 : 백그라운스 실행
-p 8080:8080 옵션 : 8080포트로 바인딩,
tc : 이름 지정
run : pull, create, start
root@ljw:~# 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
d687b940854c4438d75db591aab2d9defc3e4f53340f96ec2e0a5d0d693b0384
4. 도커 실행 확인
root@ljw:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d687b940854c consol/tomcat-7.0 "/bin/sh -c /opt/tom…" 2 minutes ago Up 2 minutes 0.0.0.0:8080->8080/tcp, 8778/tcp tc
5. 웹으로 접속하여 정상 실행 확인
'Docker' 카테고리의 다른 글
도커 라이프사이클 (0) | 2021.01.23 |
---|---|
도커 이미지 다운 (0) | 2021.01.23 |
도커 설치(Ubuntu-20.04 LTS) (0) | 2021.01.23 |