apt-get javaインストール時のエラー

DockerfileでJavaのインストールを記述してたんだけど、
どうやらこのコマンドでエラーが発生しているみたい

apt-get -yq install oracle-java8-installer oracle-java8-set-default

エラーログ

Step 5/19 : RUN apt-get update &&     apt-get -yq install oracle-java8-installer oracle-java8-set-default
 ---> Running in 379f863829a0
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:3 http://security.debian.org/debian-security stretch/updates InRelease
Hit:4 http://deb.debian.org/debian stretch Release
Get:6 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.5 kB]
Ign:6 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Get:7 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages [1556 B]
Fetched 110 kB in 9s (11.8 kB/s)
Reading package lists...
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
W: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  binutils gsfonts-x11 java-common libc-l10n libfontenc1 libxfont1 locales
  x11-common xfonts-encodings xfonts-utils
Suggested packages:
  binutils-doc binfmt-support visualvm ttf-baekmuk | ttf-unfonts
  | ttf-unfonts-core ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho
  | ttf-sazanami-mincho ttf-arphic-uming firefox | firefox-2 | iceweasel
  | mozilla-firefox | iceape-browser | mozilla-browser | epiphany-gecko
  | epiphany-webkit | epiphany-browser | galeon | midbrowser
  | moblin-web-browser | xulrunner | xulrunner-1.9 | konqueror
  | chromium-browser | midori | google-chrome
The following NEW packages will be installed:
  binutils gsfonts-x11 java-common libc-l10n libfontenc1 libxfont1 locales
  oracle-java8-installer oracle-java8-set-default x11-common xfonts-encodings
  xfonts-utils
0 upgraded, 12 newly installed, 0 to remove and 1 not upgraded.
Need to get 9002 kB of archives.
After this operation, 39.7 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  oracle-java8-installer oracle-java8-set-default
E: There were unauthenticated packages and -y was used without --allow-unauthenticated

--allow-unauthenticated オプションを使うべき?

E: There were unauthenticated packages and -y was used without --allow-unauthenticated

-y オプションを使うときは、--allow-unauthenticated をつけないといけないのか?

apt-get -yq --allow-unauthenticated install oracle-java8-installer oracle-java8-set-default 

とりあえず、オプションをつければ通るようにはなりました。

コメントを残す