0

I have Gentoo Docker image. I'm trying to install Java 8 inside the container. There are tutorials on the web, but they didn't help.

I tried to run:

emerge  --verbose dev-java/icedtea-bin:8

But got this output:

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by net-print/cups-filters-1.21.6::gentoo[postscript]
# required by net-print/cups-2.2.7::gentoo
# required by dev-java/icedtea-bin-3.10.0-r1::gentoo[cups,-multilib]
# required by virtual/jdk-1.8.0-r3::gentoo
# required by virtual/jre-1.8.0-r1::gentoo
# required by dev-java/icedtea-web-1.6.2::gentoo
>=app-text/ghostscript-gpl-9.26 cups

Use --autounmask-write to write changes to config files (honoring
CONFIG_PROTECT). Carefully examine the list of proposed changes,
paying special attention to mask or keyword changes that may expose
experimental or unstable packages.
2
  • Did you read the manual yet? If you aren’t familiar with Gentoo, you should probably not be trying to use Gentoo in Docker. Instead, learn about Gentoo as a regular OS first.
    – Daniel B
    Commented Apr 3, 2019 at 10:21
  • I tried to put packages in use file, but it did not help, maybe I did that wrong Commented Apr 3, 2019 at 10:24

2 Answers 2

0

Could install it by downloading tar.gz archive, like that:

...
RUN wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz \
 && mkdir /opt/jdk \
 && tar zxf jdk-8u131-linux-x64.tar.gz -C /opt/jdk \
 && update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_131/bin/java 100 \
 && update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_131/bin/javac 100 \
 && update-alternatives --display java \
 && update-alternatives --display javac \
 && rm -rf jdk-8u131-linux-x64.tar.gz
...
0

RUN wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz RUN mkdir /opt/jdk RUN tar zxf jdk-8u131-linux-x64.tar.gz -C /opt/jdk ENV PATH=$PATH:/opt/jdk/jdk1.8.0_131/bin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .