반응형
Docker Application 배포
Docker network 생성
docker network create --gateway 172.18.0.1 --subnet 172.18.0.0/16 ecommerce-network
RabbitMQ 설치
- https://hub.docker.com/_/rabbitmq/tags 에서 사용하고자하는 버전 다운로드
docker pull rabbitmq:latest
실행
## -d :detach mode
## --name : 도커이름
## --network : 설정한 도커 네트워크
docker run -d --name rabbitmq --network ecommerce-network \
-p 15672:15672 -p 5672:5672 -p 15671:15671 -p 5671:5671 -p 4369:4369 \
-e RABBITMQ_DEFAULT_USER=guest \
-e RABBITMQ_DEFAULT_PASS=guest rabbitmq:management
네트워크에 컨테이너 추가되었는지확인 명령
$ docker network inspect ecommerce-network
[
{
"Name": "ecommerce-network",
"Id": "347c33e0c485e3a7e7cc2f351c7742e848cacc8ac3ec4d8566752df68d438812",
"Created": "2022-12-02T04:49:02.0344778Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.21.0.0/16",
"Gateway": "172.21.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"813a9683598beea1657ad748b643989d996a6eed950fda100accd385d1590d96": {
"Name": "rabbitmq-1",
"EndpointID": "5e5c31cd453d84e9cd9df7c6b20bebc98aa6332dcc719158c83c9a854eed2563",
"MacAddress": "02:42:ac:15:00:02",
"IPv4Address": "172.21.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
반응형
'CI-CD > Docker' 카테고리의 다른 글
10. Docker Compose (0) | 2023.04.19 |
---|---|
9. Dockerfile (0) | 2023.04.19 |
8. Docker compose를 이용하여 Kafka Confluent 설치 (0) | 2023.04.19 |
7. Docker Network (0) | 2023.04.19 |
6. Docker container (0) | 2023.04.19 |