All jobs / Full-stack developer / DevOps Basics

Full-stack developer interview question · 1–3 years

The application image is over a gigabyte and takes several minutes to pull on every deploy.

How do you make it smaller, and what should not be in it at all?

The strongest answer

A multi-stage build: compile in a stage that has the toolchain, then copy only the built output and the runtime dependencies into a slim base — source, dev dependencies, caches and credentials stay behind

Why it works

Exactly — the build environment never ships. Smaller images pull faster, start faster and give a scanner less to find.

What a good answer covers

Answers that fall short

Who gets asked this

More DevOps Basics questions