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 )

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
source share