"Docker run"의 두 판 사이의 차이

20번째 줄: 20번째 줄:
Digest: sha256:f6eed4def93a3b54da920737f0abf1a8cae2e480bb368280c898265fcaf910a3
Digest: sha256:f6eed4def93a3b54da920737f0abf1a8cae2e480bb368280c898265fcaf910a3
Status: Downloaded newer image for ubuntu:14.04
Status: Downloaded newer image for ubuntu:14.04
</source>
<source lang='console'>
root@0967afc19f46:/# hostname
root@0967afc19f46:/# hostname
0967afc19f46
0967afc19f46
</source>
<source lang='console'>
root@0967afc19f46:/# exit
root@0967afc19f46:/# exit
exit
exit
</source>
<source lang='console'>
root@default:~#  
root@default:~#  
</source>
==예시2==
<source lang='console'>
$ docker search redis
NAME                              DESCRIPTION                                    STARS              OFFICIAL            AUTOMATED
redis                            Redis is an open source key-value store that…  5960                [OK]
bitnami/redis                    Bitnami Redis Docker Image                      92                                      [OK]
sameersbn/redis                                                                  71                                      [OK]
grokzen/redis-cluster            Redis cluster 3.0, 3.2, 4.0 & 5.0              38
... (생략)
xetamus/redis-resource            forked redis-resource                          0                                      [OK]
</source>
</source>



2018년 10월 29일 (월) 17:28 판

1 개요

docker run
  • 새로운 컨테이너에서 명령 실행

2 문법

$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

3 예시

root@default:~# docker run -i -t ubuntu:14.04
Unable to find image 'ubuntu:14.04' locally
14.04: Pulling from library/ubuntu
bae382666908: Pull complete 
f1ddd5e846a8: Pull complete 
90d12f864ab9: Pull complete 
a57ea72e3176: Pull complete 
783a14252520: Pull complete 
Digest: sha256:f6eed4def93a3b54da920737f0abf1a8cae2e480bb368280c898265fcaf910a3
Status: Downloaded newer image for ubuntu:14.04
root@0967afc19f46:/# hostname
0967afc19f46
root@0967afc19f46:/# exit
exit
root@default:~#

4 예시2

$ docker search redis
NAME                              DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
redis                             Redis is an open source key-value store that…   5960                [OK]
bitnami/redis                     Bitnami Redis Docker Image                      92                                      [OK]
sameersbn/redis                                                                   71                                      [OK]
grokzen/redis-cluster             Redis cluster 3.0, 3.2, 4.0 & 5.0               38
... (생략)
xetamus/redis-resource            forked redis-resource                           0                                       [OK]

5 같이 보기

6 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}