Installing dockers debian openjdk-7-jre

I am trying to install openjdk-7-jre in a docker image. But when I tried to install it, I got the following error:

E: Failed to get http://security.debian.org/pool/updates/main/o/openjdk-7/openjdk-7-jre-headless_7u111-2.6.7-2~deb8u1_amd64.deb Connection failed [IP : 200.17.202.197 80]

I spent a lot of time on this. For more information, the command in the Docker file:

RUN apt-get update -qq && apt-get install -y -f xvfb wget RUN sed -i -re 's/([az]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list && \ apt-get update -qq && \ apt-get install --fix-missing -y -f openjdk-7-jre RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ dpkg --unpack google-chrome-stable_current_amd64.deb && \ apt-get install -f -y && \ apt-get clean && \ apt-get update && \ rm google-chrome-stable_current_amd64.deb RUN npm install -g protractor mocha jasmine cucumber && \ webdriver-manager update && \ apt-get update 

What am I doing wrong?

+5
source share
2 answers

This is because you get an error in the second RUN command, apt-get update -qq . The error fades due to the -qq flag (which will lead to error messages. Try to diagnose the error without -qq )

enter image description here

You can try using below Dockerfile to install openjdk-7-jre .

 FROM ubuntu RUN apt-get update RUN apt-get install -y software-properties-common RUN add-apt-repository ppa:openjdk-r/ppa RUN apt-get update RUN apt-get install --fix-missing -y -f openjdk-7-jre 
+3
source

just added FROM debian:jessie to your dockerfile and successfully created the image. Your problem is with the internet connection , Use VPN or Proxy servers to create the image.

+1
source

Source: https://habr.com/ru/post/1259699/


All Articles