Running docker containers in different modes

1)We can run docker containers for executring only certain tasks

1
2
console
docker run <imagename>

This will execute the task mentioned in cmd or entrypoint and then container stops

2) We can also run containers for long running applicaitons.
In this scenario, we can run container interatively and/or in daemon mode
Running docker in interactive mode :
This will take you into bash shell of the container where you can execute commands.

1
2
console
docker run -it <imageName> /bin/bash

Running docker in daemon mode: Doing this will run the container in the background.
Later you can go into the container interactively.

1
2
console
docker run -d <imageName> /bin/bash
Tags:

3
Leave a Reply

Please Login to comment
  Subscribe  
newest oldest most voted
Notify of

You made some clear points there. I looked on the internet for the topic and found most guys will consent with your website.

Thanx for the effort, keep up the good work Great work, I am going to start a small Blog Engine course work using your site I hope you enjoy blogging with the popular BlogEngine.net.Thethoughts you express are really awesome. Hope you will right some more posts.

Great V I should definitely pronounce, impressed with your website. I had no trouble navigating through all the tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your client to communicate. Nice task..