jib icon indicating copy to clipboard operation
jib copied to clipboard

How to run arbitrary commands like `apt-get update`?

Open obarat opened this issue 2 years ago • 3 comments

Hello, I'm using JIB to build my multi-architecture base image. I'm following this instructions and it is working well. As part of the Dockerfile that I'm converting to JIB - using Maven, it was running the command apt-get update. How can I run the same command with JIB? Is it possible?

Thanks!

obarat avatar Oct 20 '22 19:10 obarat

Hi, glad you found helpful instructions. Does this FAQ section help in your case?

zhumin8 avatar Oct 20 '22 20:10 zhumin8

Ah thanks for the link, I didn't see that before (I just searched in issues). However that doesn't address the issue I have. I want to use only JIB to build my base image, not a Dockerfile. Is this not possible?

obarat avatar Oct 20 '22 20:10 obarat

Chiming in here, no, this is not possible @obarat (to the best of my knowledge). JIB cannot run arbitrary commands as part of its image build process. Instead, you need to move those commands to a base image that you create otherwise, and make JIB use that base image.

sschuberth avatar Oct 28 '23 17:10 sschuberth