1

I am trying to create a simple docker image.

FROM ubuntu
RUN apt-get clean
RUN apt-get update
RUN apt-get -y install wget
RUN apt-get -y install default-jre

During default-jre install, it always fails with below error.

enter image description here

enter image description here

I also did rm -rf /var/lib/apt/lists/* - does not help.

How can i fix this?

KitKarson
  • 5,211
  • 10
  • 51
  • 73

1 Answers1

1

As commented on this issue, try with default-jre-headless instead:

RUN apt-get install -q -y default-jre-headless
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks, it works great. Whats wrong with deafult-jre? I have used in the past which worked just fine. – KitKarson Jul 30 '16 at 14:43
  • @KitKarson not sure, but considering a jre-headless usually refers to servers that are not connected to a monitor and don't have X11 installed, that seems a better fit for a docker environment whose base image doesn't have X11 either. See also http://stackoverflow.com/q/24280872/6309 – VonC Jul 30 '16 at 14:46