HomeChallengesRepsProblemsLeaderboardTake a challenge

Containerise a Frontend

A Dockerfile that builds a Vite app and ships only the static output — plus the .dockerignore that stops you copying node_modules into the image.

Beginner15 min on the clock5 graded checks · 100 pointsDocker + Deploy Sprint
Graded by reading your code against the checklist below.

What you build

  • Build in a Node image, serve from an nginx image
  • Order the layers so a code change does not reinstall every dependency
  • Pin every base image to a real version, never :latest
  • Write a .dockerignore that excludes node_modules and .env
  • Run as a non-root user

Done means

Editing a source file rebuilds in seconds, not minutes, and the final image contains no toolchain.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Install dependencies before copying the source+25Containers
  2. Ship the output, not the toolchain+25Containers
  3. Pin every base image to a version+15Containers
  4. Exclude node_modules and secrets+20Containers
  5. Run as a non-root user+15Running it in production

What it teaches

The rest of Docker + Deploy Sprint