Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Building Container Images Using Dockerfiles

Creating a container image by hand is possible, but it requires manual processes. There has to be a more automatic way to build images. Manual processes do not scale and are not easily version controlled. Docker provides a solution to this problem - the Dockerfile. In this lab, you will create a Dockerfile to build an image to host a static website.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Beginner
Last updated
Sep 19, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Build a First Version
    1. Create a Dockerfile that uses httpd:2.4 as the base image, then runs basic package updates.
    2. Build the 0.1 version of the widgetfactory image using the Dockerfile.
    3. Inspect the image to see its size and layers.
  2. Challenge

    Load the Website into the Container
    1. Remove the Apache welcome page from the image.
    2. Build version 0.2 of the widgetfactory image.
    3. Inspect both versions of the widgetfactory image to see the differences in size and layers.
    4. Add the website data to the container.
    5. Build version 0.3 of the widgetfactory image.
    6. Inspect versions 0.2 and 0.3 to see the differences in size and layers.
  3. Challenge

    Run a Container from the Image
    1. Run a container from the widgetfactory:0.3 image in the terminal, to see which command it executes. Remember to publish the web server port.
    2. Stop the container running in the terminal, then start it in detached mode.
    3. View the website files in the container.
    4. Retrieve the main website page from the container and compare it to the copy on the server.
  4. Challenge

    Read Me

    Note: Many of the things done in this lab are intentionally inefficient, These tasks are done to demonstrate certain aspects of Docker, and highlight common pitfalls. These do not represent best practices.

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight