Jib: USER not respected / java running as root user

Created on 22 Apr 2020  路  3Comments  路  Source: GoogleContainerTools/jib

Environment:

  • jib-maven-plugin, 2.2.0
  • maven
  • windows

Description of the issue:
The java application is run as root user, the dockerfile initializes for a different user.
The application is failing due to the wrong user context, in this specific case the base image is selenium/node-firefox and user is seluser.

Expected behavior:
The java application is run as the user specified by the Dockerfile.

Steps to reproduce:

  1. use seluser as base image
  2. set the entrypoint to whoami

Most helpful comment

@joerg1985 Jib 2.3.0 is released with this fix!

All 3 comments

Hi @joerg1985,

Thank you for reporting this. I can reproduce this. We should fix this as a high priority.

As a workaround, you can set <container><user>seluser</user></container> or the system property jib.container.user (e.g., -Djib.container.user=seluser on the command-line).

@joerg1985 is this regression you're noticing, did it used to work with older versions?

@joerg1985 Jib 2.3.0 is released with this fix!

Was this page helpful?
0 / 5 - 0 ratings