Deploy a Website to Docker

Package and serve a personal portfolio website inside a Docker container.

Introduction

30 Second Summary

Every developer eventually faces the "it works on my machine" problem. Docker solves this by packaging your application and its environment into a single, portable unit called a container.

In this project, you will build a personal portfolio website from scratch, write a Dockerfile to package it with an Nginx web server, and run it inside a Docker container on your machine.

What You'll Build

A personal portfolio website served by Nginx inside a Docker container, built from scratch with HTML, CSS, and a custom Dockerfile.

By the end of this project, you'll have:

  • A personal portfolio website built with HTML and CSS.
  • A working Dockerfile that packages your site with the Nginx Alpine image.
  • Hands-on experience with core Docker commands including build, run, stop, and container management.
  • Secret Mission: Add a second page to your site and rebuild the image to see Docker's layer caching in action.

Are there any prerequisites?

None. This project includes full setup instructions for Docker Desktop and VS Code. No prior programming or command-line experience is required.

Install Docker Desktop

To run a website inside a Docker container, you first need Docker installed on your machine. Docker Desktop is the application that lets you build images and run containers on Windows.

In this step, you will install Docker Desktop, verify it works, and set up VS Code as your code editor.

In this step, get ready to:
  • Install Docker Desktop on your Windows machine.
  • Verify Docker is working with a test container.
  • Install VS Code and the Docker extension.
Download and install Docker Desktop

Docker Desktop bundles the Docker engine, CLI tools, and a graphical dashboard into one installer. You will download the installer from Docker's official website.

  • Open your browser and navigate to the Docker Desktop download page:
  • https://docs.docker.com/desktop/setup/install/windows-install/
  • Click the download button to get Docker Desktop Installer.exe.
  • Once the download completes, double-click Docker Desktop Installer.exe to run it.
  • The installer will launch a setup wizard. When prompted, ensure Use WSL 2 instead of Hyper-V is selected (this is the recommended backend).
  • Click through the remaining prompts and wait for the installation to complete.
  • Restart your computer if the installer asks you to.

What is WSL 2?

WSL 2 (Windows Subsystem for Linux 2) is a lightweight Linux environment built into Windows. Docker uses it as the engine that runs your containers. It provides better performance than the older Hyper-V backend.

Installer asking for a reboot?

This is normal. The installer enables WSL 2 features that require a reboot to finish configuring. Save your work, restart, and Docker Desktop will be ready when Windows loads again.

help me troubleshoot my Docker Desktop installation on Windows

Start Docker Desktop and verify installation

Now that Docker Desktop is installed, you need to launch it and confirm the Docker CLI is available in your terminal.

  • Press the Windows key to open your search bar.
  • Type Docker Desktop and press Enter to open it.
  • Wait for Docker Desktop to finish starting. The whale icon in the system tray will stop animating when it is ready.

What is the system tray?

The system tray is the small area in the bottom-right corner of your Windows taskbar, near the clock. Look for a small whale icon there. When it stops moving, Docker is ready.

  • Open a terminal by pressing the Windows key, typing PowerShell, and pressing Enter.
  • Check that Docker is available by running this command:
docker --version

✔️ I see a version number

You should see something like Docker version 27.x.x followed by build information. This confirms Docker is installed and your terminal can reach it.

ⓧ Command not found

If your terminal does not recognize the docker command, try these fixes:

  • Close your terminal completely and reopen it. The installer may have updated your PATH, but existing terminals do not pick up changes automatically.
  • Make sure Docker Desktop is running. Look for the whale icon in your system tray.
  • If you restarted your computer during installation, Docker Desktop may not have started yet. Open it from the Start menu and wait for the whale icon to appear.

help me fix docker command not found on Windows after installing Docker Desktop

  • Run the Docker hello-world test to confirm Docker can pull and run containers:
docker run hello-world

Docker will download a small test image and run it. You should see a message that starts with Hello from Docker! followed by an explanation of what just happened.

What just happened?

The docker run hello-world command pulled a tiny test image from Docker Hub, created a container from it, and ran the container. The container printed a success message and then exited.

This proves your entire Docker pipeline works: pulling images from the internet, building containers, and running them.

Seeing a network or permission error?

  • If you see a network timeout, check that your internet connection is active and that no firewall or VPN is blocking Docker's access.
  • If you see a permission denied error, make sure Docker Desktop is fully started (whale icon in system tray is steady, not animating).

help me fix docker run hello-world failing on Windows

Set up VS Code

You need a code editor to write your HTML, CSS, and Dockerfile. VS Code is a free, lightweight editor that works well with Docker.

  • Open your browser and go to https://code.visualstudio.com/.
  • Click the download button and run the installer.
  • Follow the setup wizard, accepting the defaults.
  • Once installed, press the Windows key, type VS Code, and press Enter to open it.
  • Install the Docker extension by clicking the Extensions icon in the left sidebar (it looks like four small squares).
  • Type Docker in the search bar at the top of the Extensions panel.
  • Find the extension named Docker published by Microsoft, and click Install.

Why install the Docker extension?

This extension adds syntax highlighting for Dockerfiles, making it easier to spot mistakes. It also gives you a visual panel to manage your images and containers without leaving the editor.

Can't find the Extensions sidebar?

  • You can also open Extensions with the keyboard shortcut Ctrl+Shift+X.
  • Make sure you are searching inside the Extensions panel, not the file explorer.

help me find and install extensions in VS Code

Your tools are ready. Next up, you will create the portfolio website that Docker will serve.

Create Your Portfolio Website

Docker is installed and ready to go. Now you need something to containerize.

In this step, you'll build a personal portfolio website using HTML and CSS. This is the actual application Docker will package into an image and serve to the world.

In this step, get ready to:
  • Create a project folder and write your portfolio HTML.
  • Add CSS styling for a clean, modern look.
  • Preview the site in your browser before containerizing.
Create the project folder and HTML file
  • Move to your Desktop by running this command:
cd ~/Desktop
  • Create your project folder and move into it by running these commands:
mkdir my-docker-site
cd my-docker-site
  • Confirm the folder was created by running:
ls ~/Desktop

You should see my-docker-site listed in the output.

Don't see my-docker-site?

Make sure you ran cd ~/Desktop first. If your terminal opened in a different location, the folder may have been created elsewhere.

help me find where my project folder was created

  • Open the my-docker-site folder in VS Code by running:
code .

VS Code's Explorer sidebar should now show the my-docker-site folder name at the top.

Command not recognized?

If your terminal says code is not recognized, open VS Code manually. Press Cmd+Space (macOS) or the Windows key (Windows) to open your search bar, type VS Code, and press Enter. Then click File > Open Folder and select the my-docker-site folder on your Desktop.

help me open my project folder in VS Code

  • In VS Code's Explorer sidebar, hover over the MY-DOCKER-SITE folder name and click the New File icon (a document with a plus sign).
  • Name the file index.html and press Enter.
  • Paste the following code into index.html:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Portfolio</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header>
        <h1>Hi, I'm a Developer</h1>
        <p>Welcome to my portfolio. I build things with code.</p>
    </header>
    <main>
        <section class="about">
            <h2>About Me</h2>
            <p>I'm learning Docker and containerization to deploy my projects reliably. This portfolio is running inside a Docker container!</p>
        </section>
        <section class="skills">
            <h2>My Skills</h2>
            <ul>
                <li>HTML &amp; CSS</li>
                <li>Docker</li>
                <li>Problem Solving</li>
            </ul>
        </section>
    </main>
    <footer>
        <p>Deployed with Docker &amp; Nginx</p>
    </footer>
</body>
</html>

What does this code do?

  • The <header> section displays your name and a short tagline at the top of the page.
  • The <section class="about"> block holds a paragraph about you and what you're learning.
  • The <section class="skills"> block lists your skills as an unordered list.
  • The <link rel="stylesheet" href="style.css"> line connects this HTML to the CSS file you'll create next.
  • Save index.html by pressing Cmd+S (macOS) or Ctrl+S (Windows).

You won't see a visual change yet. The next substep adds styling, then you'll preview everything in your browser.

✔️ Awesome, I've got everything!

Great. Double check you've saved index.html before moving on.

ⓧ I'd like to double check the full code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Portfolio</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header>
        <h1>Hi, I'm a Developer</h1>
        <p>Welcome to my portfolio. I build things with code.</p>
    </header>
    <main>
        <section class="about">
            <h2>About Me</h2>
            <p>I'm learning Docker and containerization to deploy my projects reliably. This portfolio is running inside a Docker container!</p>
        </section>
        <section class="skills">
            <h2>My Skills</h2>
            <ul>
                <li>HTML &amp; CSS</li>
                <li>Docker</li>
                <li>Problem Solving</li>
            </ul>
        </section>
    </main>
    <footer>
        <p>Deployed with Docker &amp; Nginx</p>
    </footer>
</body>
</html>
Create a CSS file for styling

Your HTML references a file called style.css that doesn't exist yet. Without it, your portfolio will look like plain unstyled text.

  • In VS Code's Explorer sidebar, hover over the MY-DOCKER-SITE folder name and click the New File icon again.
  • Name the file style.css and press Enter.
  • Paste the following code into style.css:
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f5f5f5;
}

header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    color: #666;
}

section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #0066cc;
    margin-bottom: 1rem;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

ul li:last-child {
    border-bottom: none;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    font-size: 0.9rem;
}

What does this code do?

  • The * selector resets default browser margins and padding so your layout is consistent.
  • The body styles center your content in a narrow column with a light gray background.
  • Each section gets a white card appearance with rounded corners and a subtle shadow.
  • The blue #0066cc color ties the header, headings, and accent border together for a cohesive look.
  • Save style.css by pressing Cmd+S (macOS) or Ctrl+S (Windows).

You won't see a visual change in VS Code itself. The next substep opens the file in your browser where you'll see the full styled page.

✔️ Awesome, I've got everything!

Great. Double check you've saved style.css before moving on.

ⓧ I'd like to double check the full code

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f5f5f5;
}

header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    color: #666;
}

section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #0066cc;
    margin-bottom: 1rem;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

ul li:last-child {
    border-bottom: none;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    font-size: 0.9rem;
}
Preview locally by opening the file in your browser

Before you hand this site to Docker, confirm it looks right by opening it directly in your browser.

  • Open File Explorer (Windows) or Finder (macOS) and navigate to the my-docker-site folder on your Desktop.
  • Right-click index.html and select Open with > your web browser (Chrome, Edge, Firefox, or Safari).

You should see a centered page with a blue heading that says "Hi, I'm a Developer", a white "About Me" card, a "My Skills" card with three items, and a small footer at the bottom.

Page looks like plain unstyled text?

This means the browser can't find style.css. Make sure both index.html and style.css are in the same folder. Also confirm the filename is exactly style.css with no extra spaces or typos.

help me fix my unstyled portfolio page

Your website is ready. Next up, you'll write a Dockerfile that tells Docker exactly how to package this site into a portable image.

Write the Dockerfile

Your portfolio website is built and previewed in the browser. Now you need to give Docker a set of instructions for packaging your site into a container image.

Those instructions live in a special file called a Dockerfile. It tells Docker which base image to start from, which files to include, and which port your app listens on.

In this step, get ready to:
  • Create a Dockerfile in your project folder.
  • Understand what each instruction does.
Create the Dockerfile

A Dockerfile has no file extension. Its name is exactly Dockerfile with a capital D.

  • In VS Code, look at the Explorer sidebar on the left.
  • Hover over the MY-DOCKER-SITE folder name and click the New File icon (a page with a plus sign).
  • Type Dockerfile and press Enter.
  • Paste the following code into the new file:
FROM nginx:1.31-alpine
COPY . /usr/share/nginx/html
EXPOSE 80
Understand each instruction

What does this code do?

  • FROM nginx:1.31-alpine tells Docker to start from the official Nginx Alpine image. Alpine is a tiny Linux distribution, so your final image stays small and fast to download.
  • COPY . /usr/share/nginx/html copies every file in your current folder (index.html, style.css, and the Dockerfile itself) into Nginx's default serving directory.
  • EXPOSE 80 documents that the container listens on port 80. It does not actually publish the port. You will do that separately when you run the container.
  • Save Dockerfile by pressing Ctrl+S (Windows) or Cmd+S (macOS).
  • Confirm the file appears in the Explorer sidebar alongside index.html and style.css.

Don't see the Dockerfile in your sidebar?

  • Make sure you named it exactly Dockerfile with a capital D and no file extension. Names like dockerfile.txt or Dockerfile.txt will not work.
  • Check that VS Code has the my-docker-site folder open. If you opened a different folder, the file may have been created elsewhere.

Why isn't my Dockerfile showing up in VS Code?

✔️ Awesome, I've got everything!

Great. Double check you have saved your file, then move on to the next step.

ⓧ I'd like to double check the full code

Your Dockerfile should contain exactly this:

FROM nginx:1.31-alpine
COPY . /usr/share/nginx/html
EXPOSE 80

Your Dockerfile is ready. Next up, you will use it to build a Docker image and run your portfolio as a live container.

Build and Run Your Container

Your Dockerfile is ready. It contains the instructions Docker needs to package your website into a deployable image.

Now it's time to run those instructions. You'll build your first Docker image and launch a container from it, making your portfolio accessible in a web browser.

In this step, get ready to:
  • Build a Docker image from your Dockerfile.
  • Run a container and view your portfolio at http://localhost:8080.
  • Inspect your running container with Docker commands.
Build the Docker image

The docker build command reads your Dockerfile and creates a Docker image. An image is a snapshot of your application and everything it needs to run, packaged into a single file.

  • Build your Docker image by running this command:
docker build -t my-portfolio .

What does this command do?

  • docker build tells Docker to read your Dockerfile and create an image.
  • -t my-portfolio tags (names) the image my-portfolio so you can refer to it later.
  • The . at the end tells Docker to use the current folder as the build context. Docker will send all the files in this folder to the build process.
  • You should see output showing Docker pulling the nginx:1.31-alpine image and copying your files in.
  • The final lines will say Successfully tagged my-portfolio:latest, confirming your image was created.

Build failed?

  • Make sure you're running the command inside the my-docker-site folder. The . in the command refers to the current directory.
  • Check that your file is named exactly Dockerfile with no file extension. It should not be Dockerfile.txt or dockerfile.
  • Confirm Docker Desktop is running by checking for the whale icon in your system tray.

Help me troubleshoot my docker build failure.

Run the container

With your image built, you can now launch a container from it. A container is a running instance of your image, like starting a program from an installer.

  • Start a container from your image by running this command:
docker run -d -p 8080:80 my-portfolio

What does this command do?

  • -d runs the container in detached mode (in the background), so your terminal stays free for more commands.
  • -p 8080:80 maps port 8080 on your machine to port 80 inside the container. Nginx serves your site on port 80 inside the container. You'll access it through port 8080 on your machine.
  • my-portfolio is the name of the image you built in the previous substep.
  • Docker will print a long string of characters to your terminal. This is your container ID. You'll use it in the next substep.
  • Open your browser and go to http://localhost:8080.
  • You should see your portfolio page with the blue heading and your skills list, served directly from Docker.

Don't see your portfolio in the browser?

  • Make sure you're using http://localhost:8080 and not port 80 or https.
  • Check that Docker Desktop is still running by looking for the whale icon in your system tray.
  • If the page doesn't load, the container might have exited immediately. You'll learn to check this in the next substep with docker ps.

Help me troubleshoot why my Docker container isn't serving my site.

Inspect your running container

Docker gives you commands to check on running containers. This is useful for troubleshooting issues or confirming everything is working as expected.

  • List all running containers by running this command:
docker ps

What should I see?

You'll see a table with columns for CONTAINER ID, IMAGE, COMMAND, CREATED, STATUS, PORTS, and NAMES. Your my-portfolio image should appear with a status of 'Up' and the port mapping 0.0.0.0:8080->80/tcp shown in the PORTS column.

The value in the CONTAINER ID column is a short version of the container ID that Docker printed earlier. You'll need this for the next command.

  • View your container's logs by running this command, replacing the container ID with your own from the CONTAINER ID column:
docker logs [[CONTAINER_ID="your container ID from docker ps"]]

What do the logs show?

You'll see Nginx's startup messages and any requests it has received. If you refreshed your browser a few times, each page load will appear as a log entry.

  • You can also see your running container visually in the Docker Desktop Dashboard. Open Docker Desktop and click Containers in the left sidebar.

Don't see any containers in docker ps?

  • Your container may have stopped immediately after starting. Run this to see all containers including stopped ones:
docker ps -a
  • If the STATUS column shows 'Exited', there may be a problem with your Dockerfile. Double-check the file contents match the Dockerfile from the previous step.
  • Rebuild with docker build -t my-portfolio . after fixing any issues.

Help me figure out why my Docker container is not showing up.

Your portfolio is live inside a Docker container. Next up, you'll learn to manage your container by stopping, restarting, and rebuilding after changes.

Manage Your Container

Your portfolio website is live inside a Docker container. But what happens when you need to update your site or free up resources?

In real development, you constantly stop, update, and restart containers. This step teaches you the full container lifecycle: stopping, restarting, rebuilding after edits, and cleaning up resources you no longer need.

In this step, get ready to:
  • Stop and restart your running container.
  • Rebuild the image after editing your website.
  • Clean up stopped containers and unused images.
Stop and restart the container

Sometimes you need to pause a container without destroying it. Stopping a container shuts down the running process but keeps the container's state intact so you can restart it later.

  • First, find your container's ID by running:
docker ps

You should see a table with a CONTAINER ID column. Copy the first few characters of your container's ID.

  • Stop your running container by running:
docker stop [[CONTAINER_ID="your container ID from docker ps"]]
  • Verify the container has stopped by running:
docker ps

The list should now be empty, meaning no containers are running.

What does docker stop do?

The docker stop command sends a graceful shutdown signal to the container. The container stops running but still exists on your system. Think of it like putting an app to sleep versus uninstalling it.

  • Restart the same container by running:
docker start [[CONTAINER_ID="your container ID from docker ps"]]
  • Open your browser to http://localhost:8080 to confirm your portfolio is back.

Site not loading after docker start?

Run docker ps to check that the container shows a status of Up. If you do not see it, make sure you used docker start (not docker run) with the correct container ID.

help me restart my stopped Docker container

Make a change and rebuild

When you edit files in your project folder, the running container does not update automatically. The container runs from a snapshot (the image) that was built at a specific point in time. To see your changes, you need to rebuild the image and run a new container.

  • Switch back to VS Code and open index.html.
  • Make a visible change to your site. For example, change the <h1> text from Hi, I'm a Developer to something else, like your actual name.
  • Save index.html.

Why doesn't the container update automatically?

A Docker image is a frozen snapshot of your files at build time. The running container uses that snapshot, not your live project folder. To get your changes into the container, you rebuild the image (creating a new snapshot) and start a fresh container from it.

  • Rebuild your Docker image with your updated files by running:
docker build -t my-portfolio .
  • Stop the currently running container by running:
docker stop [[CONTAINER_ID="your container ID from docker ps"]]
  • Run a new container from your updated image by running:
docker run -d -p 8080:80 my-portfolio
  • Refresh http://localhost:8080 in your browser. You should see your updated content.

What is the edit-rebuild-run cycle?

This three-step cycle is the core Docker development workflow. Edit your source files, rebuild the image to capture the changes, then run a new container from the fresh image. Every Docker developer repeats this loop dozens of times a day.

Getting a port conflict error?

If you see a message about port 8080 already being in use, the old container is still running. Run docker ps to find it, then stop it with docker stop before trying docker run again.

help me fix a Docker port conflict on 8080

Clean up containers and images

Stopped containers and unused images take up disk space. Cleaning them up keeps your system tidy.

  • List all containers (including stopped ones) by running:
docker ps -a

You should see your stopped container(s) with a status of Exited.

  • Remove a stopped container by running:
docker rm [[CONTAINER_ID="your stopped container ID"]]

What is the difference between stop and rm?

The docker stop command pauses a running container so you can restart it later. The docker rm command permanently deletes a stopped container. You cannot rm a container that is still running.

  • List all Docker images on your system by running:
docker images

You should see my-portfolio and nginx in the list.

  • If you want to free up disk space, remove an image by running:
docker rmi my-portfolio

Keep your image for now

Only remove the image if you are completely done with this project. If you plan to try the Secret Mission, keep my-portfolio around so you do not have to rebuild from scratch.

Seeing a conflict error when removing?

If docker rmi fails, it means a container is still using that image. Remove all containers based on the image first with docker rm, then try docker rmi again.

help me remove a Docker image that has dependent containers

Secret mission

Add a Second Page and Explore Layer Caching

Your portfolio has one page. Real websites have multiple pages, and real Docker workflows take advantage of layer caching to speed up rebuilds. Can you add a second page and see caching in action?

Clean Up Your Resources

Clean Up Your Resources

This project runs entirely on your local machine, so there are no ongoing cloud costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

Resources you used:

  • Running Docker container (port 8080:80, serving your portfolio).
  • Docker image tagged my-portfolio.
  • my-docker-site project folder with your HTML, CSS, and Dockerfile.
  • Docker Desktop application.

Keep everything running

No action needed. Choose this if you are still actively building or experimenting with Docker.

  • Your container continues running at http://localhost:8080.
  • Docker Desktop stays installed for future projects.
  • Your my-docker-site folder remains on your machine with all your files.

Pause - I'll come back to this later

Stop your running container to free up memory and CPU. Your image and files stay on disk so you can start again quickly.

  • Find your container ID by running:
docker ps
  • Stop the container by running:
docker stop [[CONTAINER_ID="your container ID from docker ps"]]
  • You can quit Docker Desktop from the system tray icon (right-click the whale icon and select Quit Docker Desktop).
  • When you are ready to come back, start Docker Desktop again and run:
docker start [[CONTAINER_ID="your container ID from docker ps"]]
  • Your portfolio will be back at http://localhost:8080.

Delete - I don't want to use this again

Remove all project resources and start fresh. This frees up all disk space used by the container, image, and project files.

  • Find and stop your running container:
docker ps
docker stop [[CONTAINER_ID="your container ID from docker ps"]]
  • Remove the stopped container:
docker rm [[CONTAINER_ID="your container ID"]]
  • Remove the Docker image:
docker rmi my-portfolio
  • Delete the project folder. On macOS or Linux, run:
cd ..
rm -rf my-docker-site
  • On Windows (PowerShell), run:
cd ..
Remove-Item -Recurse -Force my-docker-site
  • To uninstall Docker Desktop on Windows, open the Start menu and go to Settings, then Apps, then Apps & features.
  • Select Docker Desktop from the list and click Uninstall.
  • Confirm by clicking Uninstall again.

What does uninstalling Docker Desktop remove?

Uninstalling Docker Desktop removes all Docker containers, images, volumes, and other Docker-related data on your machine. It also removes the Docker CLI. Only uninstall if you do not plan to use Docker again.

Nice Work!

Nice Work!

You just containerized your first website with Docker.

You now know the core workflow that professional developers use every day to ship applications: write code, write a Dockerfile, build an image, run a container.

You've learned how to:

  • Built a personal portfolio website and wrote a Dockerfile to package it with Nginx.
  • Built a Docker image with docker build and ran it as a live container with docker run and port mapping.
  • Managed containers with docker ps, docker stop, and docker rm.
  • Secret Mission: Added a multi-page site, explored layer caching, and created a .dockerignore file.

Ready to quiz yourself?