Last active
July 1, 2022 03:14
-
-
Save jonnung/6cbeeab13585da022a93e48e69d9bc6f to your computer and use it in GitHub Desktop.
도커로 스탠드얼론 MongoDB 컨테이너를 ReplSet으로 설정하기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run --rm -p27017:27017 mongo-custom:4.4 mongod --replSet rs0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From mongo:4.4 | |
WORKDIR . | |
COPY initiateReplSet.js ./docker-entrypoint-initdb.d/ | |
CMD ["-replSet", "rs0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rs.initiate(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
감사합니다. 덕분에 테스트 인생이 편해졌습니다 😍