Sign inSign up

lonly/docker-alpine-oraclejdk8

By lonly

•Updated almost 9 years ago

This image is based on Alpine Linux image, which is only a 5MB image, and contains OracleJDK 8.

Image
1

557

lonly/docker-alpine-oraclejdk8 repository overview

⁠docker-alpine-oraclejdk8

This image is based on Alpine Linux image, which is only a 5MB image, and contains OracleJDK 8⁠.

⁠Introduction

JDK bundle contains lots of unnecessary for Docker image stuff, so it was cleaned up.

⁠Build

docker build \
--rm \
-t lonly/docker-alpine-oraclejdk8 \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` .

⁠Usage

This image could be a base image for your projects, so you may use it like this:

FROM lonly/docker-alpine-oraclejdk8

COPY ./my_app /usr/local/bin/my_app
docker build -t my_app .

There are already several images using this image, so you can refer to them as usage examples:

⁠Test

echo 'public class Main { public static void main(String[] args) { System.out.println("Hello World"); } }' > Main.java
docker run --rm -v "$(pwd)":/mnt --workdir /mnt lonly/docker-alpine-oraclejdk8 sh -c "javac Main.java && java Main"

Tag summary

Content type

Image

Digest

Size

199.3 MB

Last updated

almost 9 years ago

docker pull lonly/docker-alpine-oraclejdk8