From the course: Deploying ASP.NET Core Applications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Run and monitor a container

Run and monitor a container

From the course: Deploying ASP.NET Core Applications

Start my 1-month free trial

Run and monitor a container

- [Instructor] On a real server, you'll wanna run the container, or multiple containers as background processes. If we use Docker run with the -d flag, it'll start the container in the background. We still need -p to map the ports from inside the container to our local machine, and we'll specify the name of the image to start up. We can use Docker ps to monitor the status of this running container. The output of Docker ps is usually too wide for a single window, so I like to use the --format command to make it a little bit easier to read. I prefer using table .names .image .status, and. ports, this just customizes what output Docker ps will send to the screen. So that's a little bit more readable. This tells us that this image, HelloCoreWorld was spun up into the container called hungry_kare, it's been up for about 40 seconds, and it has internal port 5000 mapped to external port 5000. We can use Docker ps to monitor the status of this container, or we can use Docker stop, followed by…

Contents