Skip to content

Commit

Permalink
apk: fix install versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Aug 13, 2024
1 parent 3af43b4 commit 0da258d
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 80 deletions.
13 changes: 7 additions & 6 deletions 11/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
13 changes: 7 additions & 6 deletions 11/jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
15 changes: 8 additions & 7 deletions 17/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,22 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils \
tzdata \
binutils=2.37-r0 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
16 changes: 10 additions & 6 deletions 17/jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,22 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils=2.37-r0 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
15 changes: 8 additions & 7 deletions 21/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,22 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils \
tzdata \
binutils=2.37-r0 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
16 changes: 10 additions & 6 deletions 21/jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,22 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils=2.37-r0 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
15 changes: 8 additions & 7 deletions 22/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,22 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils \
tzdata \
binutils=2.37-r0 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
16 changes: 10 additions & 6 deletions 22/jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,22 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils=2.37-r0 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
13 changes: 7 additions & 6 deletions 8/jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
13 changes: 7 additions & 6 deletions 8/jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ RUN set -eux; \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
fontconfig=2.15.0-r1 ttf-dejavu=2.37-r5 \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
ca-certificates=20240705-r0 p11-kit-trust=0.25.3-r0 \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
tzdata \
musl-locales=0.1.0-r1 musl-locales-lang=0.1.0-r1 \
tzdata=2024a-r1 \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
coreutils=9.5-r1 \
# Needed to extract CN and generate aliases for certificates
openssl \
openssl=3.3.1-r3 \
\
; \
rm -rf /var/cache/apk/*

Expand Down
57 changes: 57 additions & 0 deletions config/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apk:
fonts:
packages:
fontconfig: 2.15.0-r1
ttf-dejavu: 2.37-r5
description: |
java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
cacerts:
packages:
ca-certificates: 20240705-r0
p11-kit-trust: 0.25.3-r0
description: |
utilities for keeping Alpine and OpenJDK CA certificates in sync
https://github.com/adoptium/containers/issues/293
locales:
packages:
musl-locales: 0.1.0-r1
musl-locales-lang: 0.1.0-r1
description: |
locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
binutils:
packages:
binutils: 2.37-r0
version: '>=17'
description: |
jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
tzdata:
packages:
tzdata: 2024a-r1
coreutils:
packages:
coreutils: 9.5-r1
description: |
Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
only import one at a time.
openssl:
packages:
openssl: 3.3.1-r3
description: |
Needed to extract CN and generate aliases for certificates
File renamed without changes.
28 changes: 12 additions & 16 deletions docker_templates/alpine-linux.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,22 @@ FROM {{ base_image }}

{% include 'partials/nix-env.j2' %}

{% if packages['apk'] -%}
RUN set -eux; \
apk add --no-cache \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig ttf-dejavu \
# utilities for keeping Alpine and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit-trust \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
musl-locales musl-locales-lang \
{% include 'partials/binutils.j2' -%}
tzdata \
# Contains `csplit` used for splitting multiple certificates in one file to multiple files, since keytool can
# only import one at a time.
coreutils \
# Needed to extract CN and generate aliases for certificates
openssl \
{% for package_group, details in packages['apk'].items() -%}
{% if details['version'] is not defined or version|int >= details['version']|int -%}
{% if details['description'] -%}
# {{ details['description'].strip() | replace('\n', '\n # ') }}
{% endif -%}
{%- for package, version in details['packages'].items() -%}
{{ package }}={{ version }}{% if not loop.last %} {% else %} \{% endif %}
{%- endfor %}
{% endif -%}
{% endfor -%}\
; \
rm -rf /var/cache/apk/*
{%- endif %}

ENV JAVA_VERSION {{ java_version }}

Expand Down
Loading

0 comments on commit 0da258d

Please sign in to comment.