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

Handcrafting a Container Image

If you run your website from a pre-built base image, it will require a manual process to set up the container each time it runs. For repeatability and scalability, the container, and your website code should be made into an image. In this lab, you will start with a base webserver image, modify settings in the container for your website, and then create images from the container. You'll demonstrate the importance of small changes to your container, and how they affect your image. Lastly, you will use your new images to create containers to see your hard work in action.

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

Contact sales

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

    Get and Run the Base Image
    1. Retrieve the httpd 2.4 image from Docker hub.
    2. Start a container from the httpd image.
  2. Challenge

    Install Tools and Code in the Container
    1. Log in to the container.
    2. Update the base image and install git.
    3. Get website code from GitHub.
    4. Remove the default index page and copy the website files to httpd's web serving directory.
    5. Log out of the container.
  3. Challenge

    Create an Image from the Container
    1. Find the template container's ID.
    2. Create an image named widgetfactory with version v1 from the container.  1. View the image information.

    Note: You can use the container's name in place of its ID for docker commit. However, we will practice using the container ID in this lab.

  4. Challenge

    Clean up the Template for a Second Version
    1. Log in to the container.
    2. Remove temporary files and installed utilities.
    3. Log out of the container.
    4. Find the template container's ID.
    5. Create a new image named widgetfactory with version v2 from the container
    6. View the image information.
    7. Delete the v1 image since it is obsolete.
  5. Challenge

    Run Multiple Containers from the Image
    1. Start three containers from the widgetfactory:v2 image with different published web ports. The exposed ports should be in the 8000 to 8999 range.
    2. View the running containers in Docker.
    3. View the website from each container in a browser, using the three exposed web ports.
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