Skip to content

There is a java breaking change in amd64/openjdk:8u212-jre-slim #331

Closed
@allamand

Description

@allamand

Hello,

With previous version of the amd64/openjdk:8u212-jre-slim image, I was able to uses special capabilities on the java binary under a non root user.

With the new version it does not work anymore.

Steps to reproduce

$ docker run -it --cap-add IPC_LOCK amd64/openjdk:8u212-jre-slim bash
> root@4c57bb92e8bc:/# apt-get update && apt-get -qq -y install libcap2-bin 
> root@4c57bb92e8bc:/# setcap cap_ipc_lock=ep $(readlink -f $(which java))
> root@4c57bb92e8bc:/# adduser --disabled-password --no-create-home --gecos '' --disabled-login cassandra
> root@4c57bb92e8bc:/# su cassandra
> cassandra@4c57bb92e8bc:/# /usr/local/openjdk-8/bin/java -version
/usr/local/openjdk-8/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
> root@4c57bb92e8bc:/#

This was working with previous version :

docker run -ti  --cap-add IPC_LOCK amd64/openjdk@sha256:e23dee130d76abe4fcd6c5c46e19d1701114b3a727ff78fa3e000c4c1c20c6be bash
> root@4c57bb92e8bb:/# apt-get update && apt-get -qq -y install libcap2-bin 
> root@4c57bb92e8bb:/# setcap cap_ipc_lock=ep $(readlink -f $(which java))
> root@4c57bb92e8bb:/# adduser --disabled-password --no-create-home --gecos '' --disabled-login cassandra
> root@4c57bb92e8bb:/# su cassandra
> cassandra@4c57bb92e8bb:/# /usr/bin/java  -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1~deb9u1-b01)
OpenJDK 64-Bit Server VM (build 25.212-b01, mixed mode)

I need help to be able to make it works again..

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions