質問
DockerでoracleJDK17を使うために環境を作っていますが、肝心のインストールするタイミングで落ちてしまいます。。。
インストールする際、oracleの利用規約に同意しないと行けないようですが、DockerfileのRUNに続くコマンドだけではうまくいかないようです。
なにかウマイことインストールできる術はないでしょうか?
Dockerfile
Dockerfile
FROM ubuntu:20.04 RUN apt update RUN apt install sudo RUN sudo apt update RUN sudo apt upgrade -y RUN sudo apt-get install software-properties-common -y RUN add-apt-repository ppa:linuxuprising/java -y RUN sudo apt update # このコマンドが落ちている。 RUN sudo apt-get install oracle-java17-installer oracle-java17-set-default -y
ログ
log
[+] Building 49.6s (12/12) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 348B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/ubuntu:20.04 0.9s => [1/9] FROM docker.io/library/ubuntu:20.04@sha256:47f14534bda344d9fe6ffd6effb95eefe579f4be0d508b7445cf77f61a0e5724 0.0s => CACHED [2/9] RUN apt update 0.0s => CACHED [3/9] RUN apt install sudo 0.0s => CACHED [4/9] RUN sudo apt update 0.0s => CACHED [5/9] RUN sudo apt upgrade -y 0.0s => CACHED [6/9] RUN sudo apt-get install software-properties-common -y 0.0s => [7/9] RUN add-apt-repository ppa:linuxuprising/java -y 5.6s => [8/9] RUN sudo apt update 2.1s => ERROR [9/9] RUN sudo apt-get install oracle-java17-installer oracle-java17-set-default -y 40.9s ------ > [9/9] RUN sudo apt-get install oracle-java17-installer oracle-java17-set-default -y: #12 0.384 Reading package lists... #12 0.824 Building dependency tree... #12 0.926 Reading state information... ############################################################# ~中略~ ############################################################# #12 40.80 Configuring oracle-java17-installer #12 40.80 ----------------------------------- #12 40.80 #12 40.80 Oracle No-Fee Terms and Conditions (NFTC) #12 40.80 #12 40.80 #12 40.80 #12 40.80 You MUST agree to the license available in #12 40.80 https://www.oracle.com/downloads/licenses/no-fee-license.html if you want to #12 40.80 download and use Oracle JDK 17. ############################################################# ~中略~ ############################################################# #12 40.80 #12 40.80 Disclaimer of Warranties; Limitation of Liability #12 40.80 #12 40.80 THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER #12 40.80 DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, #12 40.80 ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR #12 40.80 NONINFRINGEMENT. #12 40.80 #12 40.80 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ORACLE BE LIABLE TO YOU FOR #12 40.80 DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES #12 40.80 ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT #12 40.80 LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED #12 40.80 BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER #12 40.80 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE #12 40.80 POSSIBILITY OF SUCH DAMAGES. #12 40.80 #12 40.80 In order to install this package, you must accept the license terms, the #12 40.80 "Oracle No-Fee Terms and Conditions (NFTC)". Not accepting will cancel the #12 40.80 installation. #12 40.80 #12 40.80 Do you accept the Oracle No-Fee Terms and Conditions (NFTC) for Oracle Java SE terms? [yes/no] #12 40.80 Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111. #12 40.80 Declined "Oracle No-Fee Terms and Conditions (NFTC)" #12 40.80 #12 40.80 If you do not agree to the license terms you cannot install this software. #12 40.80 #12 40.80 The installation of this package will be canceled. #12 40.80 #12 40.80 user did not accept the oracle-license-v1-3 license #12 40.80 Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <GEN6> line 9. #12 40.80 Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN6> line 9. #12 40.81 dpkg: error processing archive /var/cache/apt/archives/oracle-java17-installer_17.0.1-1~linuxuprising5_amd64.deb (--unpack): #12 40.81 new oracle-java17-installer package pre-installation script subprocess returned error exit status 1 #12 40.83 Errors were encountered while processing: #12 40.83 /var/cache/apt/archives/oracle-java17-installer_17.0.1-1~linuxuprising5_amd64.deb #12 40.83 E: Sub-process /usr/bin/dpkg returned an error code (1) ------ executor failed running [/bin/sh -c sudo apt-get install oracle-java17-installer oracle-java17-set-default -y]: exit code: 100
まだ回答がついていません
会員登録して回答してみよう