Sign inSign up

woahbase/alpine-openjdk

By woahbase

•Updated over 8 years ago

DEPRECATED : Small Base image for S6 + OpenJDK(JRE-Base).

Image
1

1.9K

woahbase/alpine-openjdk repository overview

⁠This image and its tags are now deprecated, and are moved into separate repositories respectively for JDK 7⁠ and JDK 8⁠.

Build Status

⁠Alpine-OpenJDK

⁠Container for Alpine Linux + OpenJDK

This image⁠ serves as the base container for applications / services that require OpenJDK⁠ 7 or 8.

Built from my alpine-glibc⁠ image with the s6⁠ init system and GNU LibC overlayed⁠ in it.

The image is tagged respectively for the following architectures,

  • armhf : armhf_7(JDK 1.7), armhf_8(JDK 1.8)
  • x86_64 : x86_64_7(JDK 1.7), x86_64_8(JDK 1.8)

armhf builds have embedded binfmt_misc support and contain the qemu-user-static⁠ binary that allows for running it also inside an x64 environment that has it.


⁠Get the Image

Pull the image for your architecture it's already available from Docker Hub.

# make pull
docker pull woahbase/alpine-openjdk:x86_64_8


⁠Run

If you want to run images for other architectures, you will need to have binfmt support configured for your machine. multiarch⁠, has made it easy for us containing that into a docker container.

# make regbinfmt
docker run --rm --privileged multiarch/qemu-user-static:register --reset

Without the above, you can still run the image that is made for your architecture, e.g for an x86_64 machine..

# make
docker run --rm -it \
  --name docker_openjdk --hostname openjdk \
  woahbase/alpine-openjdk:x86_64_8

# make stop
docker stop -t 2 docker_openjdk

# make rm
# stop first
docker rm -f docker_openjdk

# make restart
docker restart docker_openjdk


⁠Shell access

# make rshell
docker exec -u root -it docker_openjdk /bin/bash

# make shell
docker exec -it docker_openjdk /bin/bash

# make logs
docker logs -f docker_openjdk


⁠Development


If you have the repository access, you can clone and build the image yourself for your own system, and can push after.


⁠Setup

Before you clone the repo⁠, you must have Git⁠, GNU make⁠, and Docker⁠ setup on the machine.

git clone https://github.com/woahbase/alpine-openjdk
cd alpine-openjdk

You can always skip installing make but you will have to type the whole docker commands then instead of using the sweet make targets.


⁠Build

You need to have binfmt_misc configured in your system to be able to build images for other architectures.

Otherwise to locally build the image for your system.

# make ARCH=x86_64 JVVMAJOR=8 build
# sets up binfmt if not x86_64
docker build --rm --compress --force-rm \
  --no-cache=true --pull \
  -f ./Dockerfile_x86_64 \
  -t woahbase/alpine-openjdk:x86_64_8 \
  --build-arg ARCH=x86_64 \
  --build-arg DOCKERSRC=alpine-base \
  --build-arg USERNAME=woahbase \
  --build-arg JVVMAJOR=8 \
  --build-arg PUID=1000 \
  --build-arg PGID=1000

# make ARCH=x86_64 JVVMAJOR=8 test
docker run --rm -it \
  --name docker_openjdk --hostname openjdk \
  woahbase/alpine-openjdk:x86_64_8 \
  java -version

# make ARCH=x86_64 JVVMAJOR=8 push
docker push woahbase/alpine-openjdk:x86_64_8


⁠Maintenance


Built daily at Travis.CI (armhf / x64 builds). Docker hub builds maintained by woahbase⁠.

Tag summary

Content type

Image

Digest

Size

67 MB

Last updated

over 8 years ago

docker pull woahbase/alpine-openjdk:x86_64_7