Sign inSign up

idealista/jdk

By idealista

•Updated about 2 years ago

Debian and Ubuntu images provisioned with OpenJDK/OracleJDK (using idealista/java-role)

Image
0

50K+

idealista/jdk repository overview

Logo

Build Status Docker Hub pulls

⁠Java Ansible role

This Ansible Role installs java (OpenJDK⁠ or Oracle JDK⁠) in a Debian/Ubuntu environment⁠.

⁠Getting Started

These instructions will get you a copy of the role for your Ansible playbook.

Once launched, it will install Java using APT Packages (default) or downloading fresh version of Oracle Technology Network.

DISCLAIMER: Usage of any version of Oracle JDK in this role implies you have accepted the Oracle Binary Code License Agreement for Java SE⁠.

⁠Prerequisities

To use this role as dependency in your playbook, prerequisites below:

Ansible 2.4.5.0 version installed. Inventory destination should be a Debian/Ubuntu environment.

For testing purposes you will need Python 2.7+⁠ and Pipenv⁠

⁠Installing

Create or add to your roles dependency file (e.g requirements.yml):

- src: http://github.com/idealista/java_role.git
  scm: git
  version: 4.0.0
  name: java

or using Ansible Galaxy⁠ as origin if you prefer:

- src: idealista.java_role
  version: 4.0.0
  name: java

Alternatively you could find tagged Docker images for Debian Jessie, Stretch, Ubuntu Xenial and Ubuntu Bionic in Docker Hub⁠.

Install the role with ansible-galaxy command:

$ ansible-galaxy install -p roles -r requirements.yml -f

Use in a playbook:

---
- hosts: someserver
  roles:
    - java

⁠Usage

⁠Docker Hub

We publish every role version as a Docker image in Docker Hub: https://hub.docker.com/r/idealista/jdk⁠.

You can pull our images by executing:

docker pull idealista/jdk:${JDK_VERSION}-${DOCKER_IMAGE_BASE}-(oraclejdk|openjdk)(-headless)?

JDK_VERSION: Preferred JDK version. DOCKER_IMAGE: Currently supporting: jessie/stretch to select between Debian versions and xenial/bionic to select between Ubuntu versions JAVA_IMPLEMENTATION: openjdk or oraclejdk. Note: -headlesssuffix should be added if openjdkis selected.

For instance:

docker pull idealista/jdk:8u191-xenial-openjdk-headless

List of versions (tags) can be checked on Docker Hub⁠

⁠Ansible

You must choose between openjdk or oraclejdk implementation overriding java_implementation variable:

defaults/main.yml⁠

⁠OpenJDK

A specific OpenJDK version should be selected overriding java_open_jdk_version variable using group vars/host vars:

Operative SystemOpenJDK version
Debian Jessie8u171-b11-1~bpo8+1 (default)
Debian Stretch8u181-b13-2~deb9u1 (default)
Debian Stretch11.0.2+9-3~bpo9+1
Ubuntu Xenial8u191-b12-2ubuntu0.16.04.1
Ubuntu Xenial9~b114-0ubuntu1 (default)
Ubuntu Bionic8u191-b12-0ubuntu0.18.04.1
Ubuntu Bionic11.0.1+13-3ubuntu1~18.04~ppa1 (default)
⁠OracleJDK

A specific OracleJDK version should be selected overriding java_oracle_jdk_version variable using group vars/host vars. Available versions are described in vars/main.yml⁠ file.

NOTE: OracleJDK support in this role is considered deprecated and will be removed in future releases.

⁠Testing

$ pipenv install -r test-requirements.txt --python 2.7
$ DOCKER_IMAGE_BASE=(debian:jessie-slim|debian:stretch-slim|amd64/ubuntu:xenial|amd64/ubuntu:bionic) JDK_VERSION=(`selected_jdk_version` see [.travis.yml](.travis.yml) file to check supported versions) pipenv run molecule test -s (openjdk|oraclejdk)

Note: debian9 (Debian Stretch) will be used as default linux distro if none is provided. It's mandatory to define a scenario (openjdk or oraclejdk must be selected).

See molecule directory⁠ to check possible testing platforms.

⁠Built With

Ansible Packer

⁠Versioning

For the versions available, see the tags on this repository⁠.

Additionaly you can see what change in each version in the CHANGELOG.md⁠ file.

⁠Authors

See also the list of contributors⁠ who participated in this project.

⁠License

Apache 2.0 License

This project is licensed under the Apache 2.0⁠ license - see the LICENSE⁠ file for details.

⁠Contributing

Please read CONTRIBUTING.md⁠ for details on our code of conduct, and the process for submitting pull requests to us.

Tag summary

Content type

Image

Digest

sha256:0c987baa1…

Size

295.2 MB

Last updated

about 2 years ago

docker pull idealista/jdk:17.0.8-focal-temurin-jdk