From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Using a Dockerfile

Using a Dockerfile

- Next task, you are going to use a Docker file. The Docker file is provided in the course Git repository and you need to create an image with the name, myapp:1.0. And then you export this image to a tar file ensuring it is OCI compliant. Let's check it out. All right, so Docker file ls Do. Where's my docker file? Find dot minus name Dockerfile. Docker file, Docker file. That sounds good. So Docker file. For this task, really the purpose is that you create the image. Which Docker file you use, that doesn't really matter because this is not about Docker, this is about creating images. So docker build minus t myapp:1.0 on dot. That's what this is all about. And then you need to save the image to a tar file, ensuring it is OCI compliant. Hey, ensuring it is OCI compliant. Don't worry about that because Docker images are OCI compliant by default. So we don't have to do anything about that. We just use docker save minus h pipe less. And what do we see? We see docker save image minus o…

Contents