Public | Automated Build

Last pushed: 5 months ago
Short Description
Oracle Java 7 image for Docker
Full Description

Docker-Java7

Summary

Repository name in Docker Hub: williamyeh/java7

This repository contains Dockerized Java 1.7, published to the public Docker Hub via automated build mechanism.

Configuration

This docker image contains the following software stack:

  • OS: Debian jessie (built from debian:jessie).

  • Java: Oracle JDK 1.7.0_76-b13

Dependencies

Why yet another Java image for Docker?

There has been quite a few Java images for Docker (e.g., search in the Docker Hub), so why reinvent the wheel?

In the beginning I used the pulse00/java. It worked well, but left some room for improvement:

  • Base OS image - It was built from stackbrew/ubuntu:13.10, which may not be the smallest one. On the other hand, debian:jessie, as recommended in this article, worth a try.

  • Unnecessary dependencies - It installed, at the very beginning of its Dockerfile, the software-properties-common package, which in turns installed some Python3 packages. I prefered to incorporate these stuff only when absolutely needed.

Therefore, I built this Docker image on my own, also as an exercise.

Alternatives

Installation

   $ docker pull williamyeh/java7

Usage

Used mostly as a base image for other Java-based applications. But if you'd like to use the CLI, here are some examples for you.

Run java

$ docker run --rm williamyeh/java7

Run javac

$ docker run -it --rm williamyeh/java7 javac

Dig into container

$ docker run -it williamyeh/java7 bash
Docker Pull Command
Owner
williamyeh
Source Repository

Comments (2)
williamyeh
3 years ago

Thank you @zoomix, I'll try to incorporate your ideas.

zoomix
3 years ago

Great image. I especially like your info page. Just one tip. I noticed you didn't remove the /var/cache/oracle-jdk7-installer folder (it holds some 130megs). That could slim the image down a bit more.