bell-sw / Liberica

Free and 100% open source Progressive Java Runtime for modern Java™ deployments supported by a leading OpenJDK contributor
https://bell-sw.com/pages/libericajdk/
GNU General Public License v2.0
299 stars 28 forks source link

apk missing in images #161

Closed DavidPerezIngeniero closed 5 months ago

DavidPerezIngeniero commented 5 months ago
$ docker run -ti --rm --entrypoint ash bellsoft/liberica-runtime-container:jdk-21.0.2-slim-musl
/ # apk
ash: apk: not found

How can I install apk? I need more packages that can be installed with apk. Previous versions of liberica images did contain apk.

kholmanskikh commented 5 months ago

We ship 2 flavors of images - regular and slim. From https://hub.docker.com/r/bellsoft/liberica-runtime-container:

Images are provided in 2 versions - regular and slim. The slim version (with 'slim' in its tag) is smaller, as it does not ship the APK package manager and consists of a single layer.

So you just need to use a regular image for the same JDK:

$ docker run -ti --rm bellsoft/liberica-runtime-container:jdk-21.0.2-musl
/ # apk list -I|grep liberica
WARNING: opening from cache https://packages.bell-sw.com/alpaquita/musl/stream/core: No such file or directory
WARNING: opening from cache https://packages.bell-sw.com/alpaquita/musl/stream/universe: No such file or directory
liberica21-lite-jdk-no-deps-21.0.2_p14-r0 x86_64 {liberica21-lite} (GPL-2.0 WITH Classpath-Exception-2.0) [installed]
liberica21-lite-jre-no-deps-21.0.2_p14-r0 x86_64 {liberica21-lite} (GPL-2.0 WITH Classpath-Exception-2.0) [installed]
/ # 
DavidPerezIngeniero commented 5 months ago

Thanks, now I understand.