Skip to content

Commit d747eac

Browse files
Updates to java 8.422.05 and latest maven
Fixes #93 Signed-off-by: Adrian Cole <[email protected]>
1 parent 6e4f413 commit d747eac

File tree

6 files changed

+79
-22
lines changed

6 files changed

+79
-22
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
deploy:
14-
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
14+
runs-on: ubuntu-24.04 # newest available distribution, aka numbat
1515
steps:
1616
- name: Checkout Repository
1717
uses: actions/checkout@v4

.github/workflows/security.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: security
3+
4+
# We don't scan documentation-only commits.
5+
on: # yamllint disable-line rule:truthy
6+
push: # non-tagged pushes to master
7+
branches:
8+
- master
9+
tags-ignore:
10+
- '*'
11+
paths-ignore:
12+
- '**/*.md'
13+
- './build-bin/*lint'
14+
- ./build-bin/mlc_config.json
15+
pull_request: # pull requests targeted at the master branch.
16+
branches:
17+
- master
18+
paths-ignore:
19+
- '**/*.md'
20+
- './build-bin/*lint'
21+
- ./build-bin/mlc_config.json
22+
23+
jobs:
24+
security:
25+
name: security
26+
runs-on: ubuntu-24.04 # newest available distribution, aka numbat
27+
# skip commits made by the release plugin
28+
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')"
29+
steps:
30+
- name: Checkout Repository
31+
uses: actions/checkout@v4
32+
- uses: actions/cache@v4
33+
name: Cache Trivy Database
34+
with:
35+
path: .trivy
36+
key: ${{ runner.os }}-trivy
37+
restore-keys: ${{ runner.os }}-trivy
38+
- name: Run Trivy vulnerability and secret scanner
39+
uses: aquasecurity/trivy-action@master
40+
id: trivy
41+
env: # See https://github.com/aquasecurity/trivy/discussions/7668
42+
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
43+
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
44+
with:
45+
scan-type: 'fs'
46+
scan-ref: '.' # scan the entire repository
47+
scanners: vuln,secret
48+
exit-code: '1'
49+
severity: HIGH,CRITICAL
50+
output: trivy-report.md
51+
cache-dir: .trivy
52+
- name: Set Summary
53+
shell: bash
54+
if: ${{ failure() && steps.trivy.conclusion == 'failure' }}
55+
# Add the Trivy report to the summary
56+
#
57+
# Note: This will cause a workflow error if trivy-report.md > the step
58+
# limit 1MiB. If this was due to too many CVEs, consider fixing them ;)
59+
run: cat trivy-report.md >> $GITHUB_STEP_SUMMARY

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616

1717
jobs:
1818
test:
19-
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
19+
runs-on: ubuntu-24.04 # newest available distribution, aka numbat
2020
steps:
2121
- name: Checkout Repository
2222
uses: actions/checkout@v4

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ ARG docker_parent_image=ghcr.io/openzipkin/alpine:3.20.2
1111
# We copy files from the context into a scratch container first to avoid a problem where docker and
1212
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
1313
# COPY --from= works around the issue.
14-
FROM scratch as code
14+
FROM scratch AS code
1515

1616
COPY . /code/
1717

18-
FROM $docker_parent_image as base
18+
FROM $docker_parent_image AS base
1919

2020
# java_version is hard-coded here to allow the following to work:
2121
# * `docker build https://github.com/openzipkin/docker-java.git`
@@ -24,7 +24,7 @@ FROM $docker_parent_image as base
2424
# * Use current version from https://pkgs.alpinelinux.org/packages?name=openjdk8
2525
# This is defined in many places because Docker has no "env" script functionality unless you use
2626
# docker-compose: When updating, update everywhere.
27-
ARG java_version=8.402.06
27+
ARG java_version=8.422.05
2828
ARG java_home=/usr/lib/jvm/java-1.8-openjdk
2929
LABEL java-version=$java_version
3030
LABEL java-home=$java_home
@@ -39,17 +39,17 @@ WORKDIR /java
3939
ENTRYPOINT ["java", "-jar"]
4040

4141
# The JDK image includes a few build utilities and Maven
42-
FROM base as jdk
42+
FROM base AS jdk
4343
LABEL org.opencontainers.image.description="OpenJDK on Alpine Linux"
44-
ARG java_version=8.402.06
45-
ARG maven_version=3.9.8
44+
ARG java_version=8.422.05
45+
ARG maven_version=3.9.9
4646
LABEL maven-version=$maven_version
4747

4848
COPY --from=code /code/install.sh .
4949
RUN ./install.sh $java_version $maven_version && rm install.sh
5050

5151
# Our JRE image is minimal: Only Alpine, libc6-compat and a JRE
52-
FROM base as jre
52+
FROM base AS jre
5353
LABEL org.opencontainers.image.description="OpenJDK JRE provided by IcedTea on Alpine Linux"
5454

5555
# Finalize JRE install:

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,25 @@ This is an internal base layer primarily used in [zipkin](https://github.com/ope
1515

1616
To try the image, run the `java -version` command:
1717
```bash
18-
docker run --rm ghcr.io/openzipkin/java:8.402.06 -version
19-
openjdk version "1.8.0_402"
20-
OpenJDK Runtime Environment (IcedTea 3.30.0) (Alpine 8.402.06-r0)
21-
OpenJDK 64-Bit Server VM (build 25.402-b06, mixed mode)
18+
openjdk version "1.8.0_422"
19+
OpenJDK Runtime Environment (IcedTea 3.32.0) (Alpine 8.422.05-r0)
20+
OpenJDK 64-Bit Server VM (build 25.422-b05, mixed mode)
2221
```
2322

2423
## Release process
2524
Build the `Dockerfile` using the current version without the revision classifier from here:
2625
* https://pkgs.alpinelinux.org/packages?name=openjdk8
2726
```bash
28-
# Note 8.402.06 not 8.402.06-r1!
29-
./build-bin/build 8.402.06
27+
# Note 8.422.05 not 8.422.05-r1!
28+
./build-bin/build 8.422.05
3029
```
3130

3231
Next, verify the built image matches that version:
3332
```bash
34-
docker run --rm openzipkin/java:test -version
35-
openjdk version "1.8.0_402"
36-
OpenJDK Runtime Environment (IcedTea 3.30.0) (Alpine 8.402.06-r0)
37-
OpenJDK 64-Bit Server VM (build 25.402-b06, mixed mode)
33+
openjdk version "1.8.0_422"
34+
OpenJDK Runtime Environment (IcedTea 3.32.0) (Alpine 8.422.05-r0)
35+
OpenJDK 64-Bit Server VM (build 25.422-b05, mixed mode)
3836
```
3937

40-
To release the image, push a tag matching the arg to `build-bin/build` (ex `8.402.06`).
38+
To release the image, push a tag matching the arg to `build-bin/build` (ex `8.422.05`).
4139
This triggers a [GitHub Actions](https://github.com/openzipkin/docker-java/actions) job to push the image.

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ apache_backup_mirror=https://downloads.apache.org/
4949
(wget ${apache_mirror}${maven_dist_path} || wget ${apache_backup_mirror}${maven_dist_path}) | tar xz --strip=1 -C maven
5050
ln -s ${PWD}/maven/bin/mvn /usr/bin/mvn
5151

52-
mvn -q --batch-mode org.apache.maven.plugins:maven-help-plugin:3.4.1:evaluate -Dexpression=maven.version -q -DforceStdout || maybe_log_crash
53-
mvn -q --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.7.1:get -Dmdep.skip
52+
mvn -q --batch-mode org.apache.maven.plugins:maven-help-plugin:3.5.1:evaluate -Dexpression=maven.version -q -DforceStdout || maybe_log_crash
53+
mvn -q --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.8.1:get -Dmdep.skip

0 commit comments

Comments
 (0)