ホームページ  >  に質問  >  本文

以下Dockerfile为何build不了?问题出在哪里?

FROM ubuntu
LABEL Description="test" Vender="test" Version="1.0"
RUN apt-get update && apt-get install -y git gcc g++ tmux apt-utils mysql-client mysql-server

docker build -t test/test .

卡在下面这里了,等多久没没用,为何会这样呢?
上面Dockerfile问题出在哪里呢?

Selecting previously unselected package psmisc.
Preparing to unpack .../psmisc_22.21-2.1build1_amd64.deb ...
Unpacking psmisc (22.21-2.1build1) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up mysql-common (5.7.16-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 10999 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.16-0ubuntu0.16.04.1_amd64.deb ...
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 mysql-server-5.7
----------------------------

While not mandatory, it is highly recommended that you set a password for the
MySQL administrative "root" user.

If this field is left blank, the password will not be changed.

New password for the MySQL "root" user: 
天蓬老师天蓬老师2706日前932

全員に返信(2)返信します

  • 迷茫

    迷茫2017-04-25 09:06:30

    これには対話が必要です。パスワードが入力されるのを待っているため、スタックします。
    この記事を参照できます: http://blog.csdn.net/fickyou/...

    返事
    0
  • PHP中文网

    PHP中文网2017-04-25 09:06:30

    構築中に対話することはできなくなります。 。 mysql が必要な場合は、mysql イメージを直接ダウンロードできます。さらに何かを追加する必要がある場合は、まず -it でコンテナーを開き、次にそれをインストールし、コンテナーを終了して、コンテナーをコミットして、イメージを作成します

    返事
    0
  • キャンセル返事