Git Product home page Git Product logo

docker-openjdk's Introduction

Build Status Slack

⚠️ This repository is deprecated. No updates will be applied anymore. There are other ways of getting the latest version of openjdk. For example look at Chainguard's images

Docker images

This repo will contain docker images with openjdk

Current versions available:

.
├── 11
│   ├── jdk
│   │   ├── slim
│   │   │   └── Dockerfile
│   │   ├── slim-aws
│   │   │   └── Dockerfile
│   │   ├── zulu
│   │   │   └── Dockerfile
│   │   └── zulu-docker
│   │       └── Dockerfile
│   └── jre
│       ├── slim
│       │   └── Dockerfile
│       └── slim-aws
│           └── Dockerfile
├── 8
│   ├── jdk
│   │   └── alpine
│   │       └── Dockerfile
│   └── jre
│       └── alpine
│           └── Dockerfile

Usage

Images can be found on https://hub.docker.com/r/philipssoftware/openjdk/.

docker run philipssoftware/openjdk:11 java -version
docker run philipssoftware/openjdk:11-jre java -version
docker run philipssoftware/openjdk:8 java -version
docker run philipssoftware/openjdk:8-jre java -version

Content

We're signing these containers and creating the SLSA-provenance and SBOM for this project. You can check the signature, SBOM and SLSA-provenance by installing Cosign locally, get the cosign.pub file from the repository and perform the following steps:

Check signature

The containers are signed with Cosign. The public key can be found in the root of the repository in a file: cosign.pub.

cosign verify --key cosign.pub philipssoftware/openjdk:11-jdk-zulu

Check SBOM

The SBOM is created with Syft and is attached to the containers. You can verify the attestation with Cosign by executing the following command:

cosign verify-attestation --key cosign.pub philipssoftware/openjdk:11-jdk-zulu | jq '.payload |= @base64d | .payload | fromjson | select( .predicateType=="https://spdx.dev/Document" ) | .predicate.Data | fromjson | .'

Check SLSA-Provenance file

The SLSA-Provenance file is created with SLSA-provenance-action and is attached to the containers. You can verify the attestation with Cosign by executing the following command:

cosign verify-attestation --key cosign.pub philipssoftware/openjdk:11-jdk-zulu | jq '.payload |= @base64d | .payload | fromjson | select( .predicateType=="https://slsa.dev/provenance/v0.2" ) |  .'

Other files

The images obviously contain openjdk, but also two other files:

  • REPO
  • TAGS

This was a way to provide some provenance on the containers. This is now deprecated in favor of the attestations mentioned above.

REPO

This file has a url to the REPO with specific commit-sha of the build. Example:

$ docker run philipssoftware/openjdk:11 cat REPO
https://github.com/philips-software/docker-openjdk/tree/facb2271e5a563e5d6f65ca3f475cefac37b8b6c

TAGS

This contains all the similar tags at the point of creation.

$ docker run philipssoftware/openjdk:11 cat TAGS
openjdk openjdk:11 openjdk:11-jdk openjdk:11-jdk-slim openjdk:11.0.16-jdk-slim

You can use this to pin down a version of the container from an existing development build for production. When using openjdk:11 for development. This ensures that you've got all security updates in your build. If you want to pin the version of your image down for production, you can use this file inside of the container to look for the most specific tag, the last one.

Simple Tags

openjdk

openjdk with aws-cli

openjdk with docker

Why

Why do we have our own docker image definitions?

We often need some tools in a container for checking some things. F.e. jq, aws-cli and curl. We can install this every time we need a container, but having this baked into a container seems a better approach.

That's why we want our own docker file definitions.

Issues

Author

License

License is MIT. See LICENSE file

Philips Forest

This module is part of the Philips Forest.

                                                     ___                   _
                                                    / __\__  _ __ ___  ___| |_
                                                   / _\/ _ \| '__/ _ \/ __| __|
                                                  / / | (_) | | |  __/\__ \ |_
                                                  \/   \___/|_|  \___||___/\__|  

                                                                 Infrastructure

Talk to the forestkeepers in the docker-images-channel on Slack.

Slack

docker-openjdk's People

Contributors

agterdenbos avatar bartgolsteijn avatar brend-smits avatar dependabot[bot] avatar eye2web avatar jeroenknoops avatar npalm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-openjdk's Issues

Images size is too big.

Images are very big.
This is caused by AWS-cli.

AWS-cli is used for:

  1. Build time: to push images to ECR
  2. Runtime for HIPAA ineligible services

Create seperate tags with and without AWS-cli

Add more precise tags with specific java version.

Currently we're tagging the images on a higher level. f.e. openjdk:11-jre and openjdk:11-jre-slim

This is nice, because now you can use openjdk:11-jre and we will take care of the updates.

But when you put stuff to production, you might pin the version down to a specific patch version of java, f.e. 11.0.1-jre-slim

Add this version as well, so environment can freeze their version of the image, making your production code immutable, thus reproducible.

Append jdk images with `-gha` and add deprecation warning to original.

As part of #53 we need to perform the first step:

Create new docker-image based on the original with -gha appended to the tag and add deprecation warning to the original.

  • Create new image based on original with -gha appended to it.
  • Make sure the build order is correct to ensure the correct base image.
  • Add deprecation warning to original image.

Add java 8 jdk image.

We need to have a java 8 jdk image to for building our software.

JAVA_VERSION : 8u191

Add java 11

Java has moved to version 11. Add this one

GitHub Actions requires user ROOT

Problem

Github Actions requires the user of the image to be ROOT otherwise it cannot checkout the repository.

Quick solution

Removing the java USER is possible, but it's also considered bad practice to create docker images with root.

Fix

In order to fix this issue, we will create a new docker-image with -gha (github actions) appended to the image tag.
The only difference with the original images are that they run with USER root

Images with USER root

In order to do this we need to do the following to images already running with user ROOT:

  • Create new docker-image based on the original with -gha appended to the tag and add deprecation warning to the original. (see #54)
  • After a week, add USER java to original image

Images with USER java

In order to do this we need to do the following to images already running with user JAVA:

  • Create new docker-image based on original image with USER: root and append tag with -gha.

This only applies to jdk images.

Add maven

Often projects use maven. Please add version with maven.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.