error message
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
The reason is that when using apt-get to install dependencies, there may be a dialog box. If you don't choose to make an image, it will lead to failure. The solution is very simple.
Add a sentence to the docker file:
ENV DEBIAN_FRONTEND noninteractive