Getting docker build to show IDs of intermediate containers

Since version 18.09 Docker has added a new backend for building images, buildkit. This offers a bunch of benefits but doesn’t expose intermediate containers in the same way as the old backend. Fortunately you can disable buildkit.

You don’t need to disable buildkit permanently for this and you shouldn’t because it will make all your builds slower. You can just set an environment variable when you docker build, like this:

Powershell

$env:DOCKER_BUILDKIT=0; docker build .

Linux/macOS

DOCKER_BUILDKIT=0 docker build .

Windows cmd

set DOCKER_BUILDKIT=0& docker build .

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)