docker run -d -p

1 개요[ | ]

docker run -d -p
docker run -d -p 80:80 my_image service nginx start
docker run -d -p 80:80 my_image nginx -g 'daemon off;'
docker run -d --name redisDynamic -p 6379 redis:latest
docker run -d --name redisHostPort -p 6379:6379 redis:latest

2 실행예시[ | ]

$ docker run -d --name redisDynamic -p 6379 redis:latest
b0800666613b51dc1e8b7bece5f86057c7f4579fb2e87c256d885dfdec561c63
$ docker ps -f name=redisDynamic
CONTAINER ID        IMAGE               COMMAND                  CREATED  STATUS              PORTS                     NAMES
b0800666613b        redis:latest        "docker-entrypoint.s…"   28 seconds ago  Up 27 seconds       0.0.0.0:32768->6379/tcp   redisDynamic
$ docker run -d --name redisHostPort -p 6379:6379 redis:latest
570a15e2190db4c426c6b0514ac416caee9ae3bdc2e6315f5267e420beb04b4b
$ docker ps -f name=redisHostPort
CONTAINER ID        IMAGE               COMMAND                  CREATED  STATUS              PORTS                    NAMES
570a15e2190d        redis:latest        "docker-entrypoint.s…"   52 seconds ago  Up 51 seconds       0.0.0.0:6379->6379/tcp   redisHostPort

3 같이 보기[ | ]

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