How to install container on Docker work in background with assigned IP and name.

 I assume that, you know how to install docker on linux.

I am going to install  The OWASP Juice Shop in Docker on Kali Linux.

To do that use the below linux command on the terminal:

docker run -d -p 3000:3000 --name juice-shop bkimminich/juice-shop


You will see the image will be download and install automatically.


Let me explain the command:

docker run -d -p 3000:3000 --name juice-shop bkimminich/juice-shop

  • Docker run will try start and run to pull the container image from the cloud server hosted on any server.
  • the -d flag runs a detached background container, if you don't use -d flag when you close or cancel your terminal your container will be stopped.
  • -P flag publishes network ports so you can send traffic into the container and also you can access the container over with your assigned local IP or localhost with aligned ports.
  • --name flag gives the container a name so you can work with it in other commands
That's all now you can easily access and run your container background until you stopped it manually.


Comments