Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker cli use older logging?

Tags:

docker

I just installed docker desktop on my windows box, but I uses the new output style, i'd like to switch back to the old style, having trouble finding the exact command or profile part to change.

What I have

docker build .
[+] Building 0.8s (10/10) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.1s
 => => transferring dockerfile: 32B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/php:7.4.12-fpm-buster                                           0.5s
 => [1/6] FROM docker.io/library/php:7.4.12-fpm-buster@sha256:07db4f537d7ea591cd9cecda712aed03ac1aaba8f243961c396  0.0s
 => CACHED [2/6] RUN apt-get update && apt-get upgrade -y && apt-get install git zip -y                            0.0s
 => CACHED [3/6] WORKDIR /var/www                                                                                  0.0s
 => CACHED [4/6] RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=  0.0s
 => CACHED [5/6] RUN composer --version                                                                            0.0s
 => CACHED [6/6] RUN composer require google/cloud google/auth phpseclib/phpseclib                                 0.0s
 => exporting to image                                                                                             0.1s
 => => exporting layers                                                                                            0.0s
 => => writing image sha256:ee8e9007493a15d9ba26d4cf46cdbc7c618a9ab949c7ff9c5e5e2ce717f039d5                       0.0s

What I want

 docker build .
Sending build context to Docker daemon  2.048kB
Step 1/7 : FROM php:7.4.12-fpm-buster
 ---> 15d55c4fd75d
Step 2/7 : RUN apt-get update && apt-get upgrade -y && apt-get install git zip -y
 ---> Running in 6d719912d1e1
...
like image 521
Stephan Avatar asked Jan 28 '26 07:01

Stephan


1 Answers

The new logging style comes from the BuildKit features.

You can disable this in the Docker Desktop GUI:

  1. select the Docker Engine tab
  2. set "features"{ "buildkit" : false }

docker engine buildkit false

Then if you want to use the logging features again, you can run with DOCKER_BUILDKIT=1. I believe you can run with DOCKER_BUILDKIT=0 if you want to selectively disable but haven't tested that yet.


Of course, be aware that you'll lose out on the following features that BuildKit adds to Docker:

  • Docker images created with BuildKit can be pushed to Docker Hub just like Docker images created with legacy build
  • the Dockerfile format that works on legacy build will also work with BuildKit builds
  • The new --secret command line option allows the user to pass secret information for building new images with a specified Dockerfile
like image 141
tentative Avatar answered Jan 31 '26 03:01

tentative



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!