From the course: Learning Docker

Unlock the full course today

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

Create a Docker container from Dockerfiles, part 1

Create a Docker container from Dockerfiles, part 1 - Docker Tutorial

From the course: Learning Docker

Create a Docker container from Dockerfiles, part 1

- [Instructor] So far, we've been creating containers from Docker images published on Docker Hub. However, this isn't very helpful if we're trying to create a container for our own app. Fortunately, Docker makes it very easy to build our own Docker images and start containers from them. We can even push our app to the Docker hub when we're ready to share our work with the world. I'll show you how to do that later in this course. For now, let's build an image from our own Docker file and start a container from it. There should be two files in your exercise files for this section, a Docker file, and an example quote unquote app called entry point dot bash. This app simply tells us the current time. Let's open the Docker file in your favorite editor. I'm going to open mine in Vim. This is an example of a Docker file that you might see in the wild. There are lots of keywords in the Docker files syntax. Visit the link shown…

Contents