You don’t have to use && . Even official images use shell options like this:
It still uses backslashes, but you can avoid those if using the heredoc syntax
https://docs.docker.com/reference/dockerfile/#here-documents
# syntax=docker/dockerfile:1
FROM debian
RUN <<EOT bash
set -ex
apt-get update
apt-get install -y vim
EOT
Regarding progress formats, I understand the problem and a more compact format could be a feature request, but I wrote script that shows only the logs. It is based on the “rawjson” output format
docker buildx build --secret id=aws,src=test.txt . -t localhost/test \
--progress rawjson --no-cache &>/dev/stdout \
| jq -r '.logs | select(. != null) | .[].data' \
| base64 -d
You could use something like this and with a more complex jq filter you could also include other metadata as well if needed. It is just for demonstrating the rawjson format. Here is my output:
Collecting awscli
Downloading awscli-1.42.28-py3-none-any.whl.metadata (11 kB)
Collecting botocore==1.40.28 (from awscli)
Downloading botocore-1.40.28-py3-none-any.whl.metadata (5.7 kB)
Collecting docutils<=0.19,>=0.18.1 (from awscli)
Downloading docutils-0.19-py3-none-any.whl.metadata (2.7 kB)
Collecting s3transfer<0.15.0,>=0.14.0 (from awscli)
Downloading s3transfer-0.14.0-py3-none-any.whl.metadata (1.7 kB)
Collecting PyYAML<6.1,>=3.10 (from awscli)
Downloading PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (2.1 kB)
Collecting colorama<0.4.7,>=0.2.5 (from awscli)
Downloading colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting rsa<4.8,>=3.1.2 (from awscli)
Downloading rsa-4.7.2-py3-none-any.whl.metadata (3.6 kB)
Collecting jmespath<2.0.0,>=0.7.1 (from botocore==1.40.28->awscli)
Downloading jmespath-1.0.1-py3-none-any.whl.metadata (7.6 kB)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.40.28->awscli)
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting urllib3!=2.2.0,<3,>=1.25.4 (from botocore==1.40.28->awscli)
Downloading urllib3-2.5.0-py3-none-any.whl.metadata (6.5 kB)
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.40.28->awscli)
Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting pyasn1>=0.1.3 (from rsa<4.8,>=3.1.2->awscli)
Downloading pyasn1-0.6.1-py3-none-any.whl.metadata (8.4 kB)
Downloading awscli-1.42.28-py3-none-any.whl (4.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.7/4.7 MB 30.1 MB/s 0:00:00
Downloading botocore-1.40.28-py3-none-any.whl (14.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 55.9 MB/s 0:00:00
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading docutils-0.19-py3-none-any.whl (570 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 570.5/570.5 kB 39.6 MB/s 0:00:00
Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Downloading PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (733 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 733.4/733.4 kB 60.3 MB/s 0:00:00
Downloading rsa-4.7.2-py3-none-any.whl (34 kB)
Downloading s3transfer-0.14.0-py3-none-any.whl (85 kB)
Downloading urllib3-2.5.0-py3-none-any.whl (129 kB)
Downloading pyasn1-0.6.1-py3-none-any.whl (83 kB)
Downloading six-1.17.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: urllib3, six, PyYAML, pyasn1, jmespath, docutils, colorama, rsa, python-dateutil, botocore, s3transfer, awscli
Successfully installed PyYAML-6.0.2 awscli-1.42.28 botocore-1.40.28 colorama-0.4.6 docutils-0.19 jmespath-1.0.1 pyasn1-0.6.1 python-dateutil-2.9.0.post0 rsa-4.7.2 s3transfer-0.14.0 six-1.17.0 urllib3-2.5.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
NOthing
If you want to ask for a feature, you can do it in the roadmap