TransWikia.com

Is there a way to customize the owner of extraDirectories added by jib?

Stack Overflow Asked on December 16, 2021

We’re trying to add extraDirectories using jib to add a couple app-specific files, but we’d prefer the files to be owned by a user that exists in the base image, and not owned by root. We need the files to be writable by the user, but don’t want them writable by others.

I know you can use extraDirectories.permissions to set permissions on the paths, but is there a way to set owner and group of the files?

One Answer

Check out the Jib Ownership Extension (for Maven and Gradle).

The main Jib plugin purposely does not allow changing ownership, but with the Jib Ownership Extension, you can change the ownership of any files as long as they are placed by Jib.


Bonus: what is a Jib Extension?

Just FYI, Jib has its own extension mechanism and allows anyone to write an extension to tweak the behavior of Jib. If you want to learn more about the general Jib extension framework or browse other useful Jib extensions, check out the jib-extensions GitHub repo.

Answered by Chanseok Oh on December 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP