Docker and Kubernetes

Rebuild a Docker image from scratch

Force Docker to rebuild every step, ignoring its cache, when changes aren't showing up.

Fill these in once
  1. Rebuild without the cache
    Terminal
    docker build --no-cache -t my-app .
  2. Also fetch the newest base image
    Terminal
    docker build --pull --no-cache -t my-app .
  3. With Docker Compose
    Terminal
    docker compose build --no-cache
  1. Rebuild without the cache
    Terminal · Ubuntu / Debian
    docker build --no-cache -t my-app .
  2. Also fetch the newest base image
    Terminal · Ubuntu / Debian
    docker build --pull --no-cache -t my-app .
  3. With Docker Compose
    Terminal · Ubuntu / Debian
    docker compose build --no-cache
  1. Rebuild without the cache
    PowerShell
    docker build --no-cache -t my-app .
  2. Also fetch the newest base image
    PowerShell
    docker build --pull --no-cache -t my-app .
  3. With Docker Compose
    PowerShell
    docker compose build --no-cache