Created
August 9, 2021 19:37
-
-
Save flashgrimmie/103a81484a7e74b20ac5230b71eb0dc1 to your computer and use it in GitHub Desktop.
Run "mongo --repair" in Docker container that cannot start because of MongoDB error
This file contains hidden or 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
#!/bin/bash | |
# See https://github.com/docker-library/mongo/pull/63 | |
docker run --rm --volumes-from my-mongo-server mongo unlink "/data/db/mongod.lock" | |
docker run --rm --volumes-from my-mongo-server mongo --repair |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment