spesialis mongodb docker guide
- start mongodb server
sudo docker run --name mongodb-spesialis -p 27017:27017 -d mongo:4.4
if the message is something like this:
docker: Error response from daemon: Conflict. The container name "/mongodb-spesialis" is already in use by container "195f5c9430778c8a90e34c0398489863ff3d919741afe1fd1c007aee7c91abe0". You have to remove (or rename) that container to be able to reuse that name.
then we can just start the container
sudo docker container start mongodb-spesialis
- run mongodb client - start container
sudo docker run -d --name mongosh-spesialis mongo:4.4
- connect mongodb client
sudo docker exec -it mongosh-spesialis mongo