From the course: Learning Docker

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Interact with your container

Interact with your container - Docker Tutorial

From the course: Learning Docker

Interact with your container

- [Instructor] Up to this point, we've been running containers that immediately exit after running their entry point commands. We can also run containers that do not immediately exit, like servers, for example. Let's explore this concept further. You should have a new Docker file in this section called server dot dockerfile. I'm going to open this file in Vim to take a look. Feel free to use your favorite editor instead, though. As we can see, it looks very similar to our first Docker file. The only difference here is that we're copying a file called server dot bash instead of entry point dot bash. Let's build in and start a container format just like we did before. I'll start by typing docker build just like before. This time, our Docker file is not called Dockerfile. It's called server dot Dockerfile. Because of this, I'm going to provide the dash dash file option before server dot dockerfile so that Docker knows…

Contents