PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

How to run a MongoDB Docker container with exposed port

docker run -d  --name mongo-on-docker  -p 27888:27017 -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo

This command allows you to start a new MongoDB container with exposed port so that you could access the instance from the outside world.

BETA Snippet explanation automatically generated by OpenAI:

Here is what the above code is doing:
1. Run a Docker container in the background and call it mongo-on-docker
2. Map the exposed port 27017 from the Docker container to port 27888 on the host
3. Set the environment variable MONGO_INITDB_ROOT_USERNAME to m

Snippet By Bobby Iliev

ยท

Created October 11th, 2021

ยท

Report Snippet