The process of installing percona-server in docker hangs for a long time

Hi, everyone:
I am making a mirror image of percona-server-8.0 through Dockerfile, but every time it gets stuck in the following output

Get:17 http://repo.percona.com/ps-80/apt buster/main amd64 percona-server-tokudb amd64 8.0.22-13-1.buster [5025 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 39.0 MB in 2h 40min 31s (4047 B/s)
Selecting previously unselected package perl-modules-5.28.
(Reading database ... 8580 files and directories currently installed.)
Preparing to unpack .../0-perl-modules-5.28_5.28.1-6+deb10u1_all.deb ...
Unpacking perl-modules-5.28 (5.28.1-6+deb10u1) ...
Selecting previously unselected package libgdbm6:amd64.
Preparing to unpack .../1-libgdbm6_1.18.1-4_amd64.deb ...
Unpacking libgdbm6:amd64 (1.18.1-4) ...
Selecting previously unselected package libgdbm-compat4:amd64.
Preparing to unpack .../2-libgdbm-compat4_1.18.1-4_amd64.deb ...
Unpacking libgdbm-compat4:amd64 (1.18.1-4) ...
Selecting previously unselected package libperl5.28:amd64.
Preparing to unpack .../3-libperl5.28_5.28.1-6+deb10u1_amd64.deb ...
Unpacking libperl5.28:amd64 (5.28.1-6+deb10u1) ...
Selecting previously unselected package perl.
Preparing to unpack .../4-perl_5.28.1-6+deb10u1_amd64.deb ...
Unpacking perl (5.28.1-6+deb10u1) ...
Selecting previously unselected package liblocale-gettext-perl.
Preparing to unpack .../5-liblocale-gettext-perl_1.07-3+b4_amd64.deb ...
Unpacking liblocale-gettext-perl (1.07-3+b4) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../6-libdpkg-perl_1.19.7_all.deb ...
Unpacking libdpkg-perl (1.19.7) ...
Selecting previously unselected package libfile-fnmatch-perl.
Preparing to unpack .../7-libfile-fnmatch-perl_0.02-2+b6_amd64.deb ...
Unpacking libfile-fnmatch-perl (0.02-2+b6) ...
Selecting previously unselected package debsums.
Preparing to unpack .../8-debsums_2.2.3_all.deb ...
Unpacking debsums (2.2.3) ...
Setting up perl-modules-5.28 (5.28.1-6+deb10u1) ...
Setting up libgdbm6:amd64 (1.18.1-4) ...
Setting up libgdbm-compat4:amd64 (1.18.1-4) ...
Setting up libperl5.28:amd64 (5.28.1-6+deb10u1) ...
Setting up perl (5.28.1-6+deb10u1) ...
Setting up libdpkg-perl (1.19.7) ...
Setting up libfile-fnmatch-perl (0.02-2+b6) ...
Setting up debsums (2.2.3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Selecting previously unselected package percona-server-common.
(Reading database ... 10739 files and directories currently installed.)
Preparing to unpack .../0-percona-server-common_8.0.22-13-1.buster_amd64.deb ...
Unpacking percona-server-common (8.0.22-13-1.buster) ...
Selecting previously unselected package percona-server-client.
Preparing to unpack .../1-percona-server-client_8.0.22-13-1.buster_amd64.deb ...
Unpacking percona-server-client (8.0.22-13-1.buster) ...
Selecting previously unselected package percona-server-server.
Preparing to unpack .../2-percona-server-server_8.0.22-13-1.buster_amd64.deb ...
Unpacking percona-server-server (8.0.22-13-1.buster) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../3-bzip2_1.0.6-9.2~deb10u1_amd64.deb ...
Unpacking bzip2 (1.0.6-9.2~deb10u1) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../4-libfile-fcntllock-perl_0.22-3+b5_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3+b5) ...
Selecting previously unselected package libjemalloc1.
Preparing to unpack .../5-libjemalloc1_3.6.0-11_amd64.deb ...
Unpacking libjemalloc1 (3.6.0-11) ...
Selecting previously unselected package percona-server-rocksdb.
Preparing to unpack .../6-percona-server-rocksdb_8.0.22-13-1.buster_amd64.deb ...
Unpacking percona-server-rocksdb (8.0.22-13-1.buster) ...
Selecting previously unselected package percona-server-tokudb.
Preparing to unpack .../7-percona-server-tokudb_8.0.22-13-1.buster_amd64.deb ...
Unpacking percona-server-tokudb (8.0.22-13-1.buster) ...
Setting up libjemalloc1 (3.6.0-11) ...
Setting up libfile-fcntllock-perl (0.22-3+b5) ...
Setting up percona-server-common (8.0.22-13-1.buster) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up percona-server-client (8.0.22-13-1.buster) ...
Setting up bzip2 (1.0.6-9.2~deb10u1) ...
Setting up liblocale-gettext-perl (1.07-3+b4) ...
Setting up percona-server-server (8.0.22-13-1.buster) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Configuring percona-server-server
---------------------------------

Data directory found when no Percona Server package is installed

A data directory '/var/lib/mysql' is present on this system when no MySQL
server package is currently installed on the system. The directory may be under
control of server package received from third-party vendors. It may also be an
unclaimed data directory from previous removal of mysql packages.

It is highly recommended to take data backup. If you have not done so, now
would be the time to take backup in another shell. Once completed, press 'Ok'
to continue.

Please provide a strong password that will be set for the root account of your
MySQL database. Leave it blank to enable password less login using UNIX socket
based authentication.

Enter root password: 

No matter whether I entered the password or not, there is no response for several hours after I press Enter.I really don’t care if there is a root password, I actually want to need an empty root password.

This is part of my dockerfile about installing percona-server

RUN rm -rf /var/lib/mysql
RUN percona-release setup -y ps80 && \
    apt-get install -y  \
    percona-server-server \
    percona-server-tokudb \
    percona-server-rocksdb && \
    apt-get clean all && \
    rm -rf /var/lib/apt/lists/* /var/lib/mysql

PS: Regardless of whether I execute RUN rm -rf /var/lib/mysql before installation, the same consequences

Please help me, thank you very much.

1 Like

I see you are using your own Dockerfile.
Why would not use our Dockerfile which is known to work?

Also we have our own official Docker images
https://hub.docker.com/r/percona/percona-server

As for your specific problem, you probably need to set
DEBIAN_FRONTEND=“noninteractive”
in your Docker.
For example, see answers in

1 Like

Hi @keith .

Yes @vadimtk is right.
You need to use DEBIAN_FRONTEND=“noninteractive” as our debian packages use interactive installation. So your docker hung and waits for input

1 Like