Best way to run multiple docker containers that use Java

The current situation is as follows: I currently have a Docker container with the following image: https://hub.docker.com/r/appium/appium

As you can see from the Dockerfile (https://hub.docker.com/r/appium/appium/dockerfile), a few different dependencies are installed when deploying the container:

RUN apt-get -qqy update &&
apt-get -qqy –no-install-recommends install
openjdk-8-jdk
ca-certificates
tzdata
zip
unzip
curl
wget
libqt5webkit5
libgconf-2-4
xvfb
gnupg
&& rm -rf /var/lib/apt/lists/*

The problem now is that I want to deploy several containers with this image, which would always result in large file sizes of the containers (mainly because of Java).
Is there a way to share the dependencies (especially Java) between the different containers?

Thanks a lot in advance!

Source: Docker Questions