C:\Users\lgltm>mongosh
'mongosh' is not recognized as an internal or external command,
operable program or batch file.
없다고 나옴 당황하지 말고
C:\Users\lgltm>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
691423ae5404 mongo:7 "docker-entrypoint.s…" 7 weeks ago Up 2 hours 0.0.0.0:27017->27017/tcp, [::]:27017->27017/tcp recursing_boyd
4105a1ad1976 redis:7-alpine "docker-entrypoint.s…" 7 weeks ago Up 2 hours 0.0.0.0:6379->6379/tcp, [::]:6379->6379/tcp amazing_neumann
852e4a8d57b2 gvenzl/oracle-xe "container-entrypoin…" 4 months ago Up 2 hours 0.0.0.0:1521->1521/tcp, [::]:1521->1521/tcp, 0.0.0.0:5500->5500/tcp, [::]:5500->5500/tcp oracle-xe
도커에서 사용중인 container Id를 가져다가
C:\Users\lgltm>docker exec -it 691423ae**4 mongosh
Current Mongosh Log ID: 695ca39ffd212a12fe9dc29c
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.5.9
Using MongoDB: 7.0.25
Using Mongosh: 2.5.9
찾고
test> use admin
switched to db admin
admin>use 너가만들려는repo이름적는다.
결과
admin> use wishnotification
switched to db wishnotification
wishnotification>'[Docker]' 카테고리의 다른 글
| [Docker] xargs 유틸리티 없는 문제 (0) | 2025.06.26 |
|---|---|
| [Docker]failed to read dockerfile: open Dockerfile: no such file or directory (0) | 2025.06.26 |
| [Docker]oracle -19c 도커에 실행시키기 (1) | 2025.06.13 |