From the course: Kubernetes for Java Developers

Unlock the full course today

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

Docker image and container

Docker image and container

From the course: Kubernetes for Java Developers

Start my 1-month free trial

Docker image and container

- [Narrator] Now that you understand the basic Docker workflow, lets learn the basic concepts around Docker image and container. We'll learn how a Docker image can be created and a container can be run. Let's start by looking at how we can create a Docker image. Docker image can be built from a text-based file, usually called a Dockerfile. Dockerfile is a text document that contains all the commands a user could call on the command line to assemble the image. Docker runs instructions in a Docker file in the specified order. A Dockerfile must start with a FROM instruction. The FROM instruction specifies a base image from which you are building. The base imagine could be an operating system or another general purpose image built by somebody and already has some of the tools that you need for the application. For example, OpenJDK is an image that we'll use in our course. Dockerfile syntax allows multiple instructions. ADD is one such instruction that copies new files, directories, or…

Contents