From the course: Docker: Build and Optimize Docker Images
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Challenge: Working with the build cache - Docker Tutorial
From the course: Docker: Build and Optimize Docker Images
Challenge: Working with the build cache
(upbeat music) - [Instructor] It is time for another challenge. In this challenge, you'll practice working with the build cache to increase build times. You'll do that by reducing rebuilds of unchanged image layers. Here are your challenge tasks. First, build the image for our project from scratch and tag it as your username/docker-image-demo:2.3.3. Next, build the image again and pull in the latest changes from the base image. Use the same image tag from the previous task. And finally build the image again by sharing the build cash from a previous version, 2.3.1. For extra credit, update the version labels that exist in the docker file and compose .yml files. Also, update the image version in the compose file. Build the image again to incorporate these changes. That's it. This challenge should take approximately 5 to 10 minutes. Good luck, and in the next video, I'll show you how I would go about solving this challenge.