How to use custom user with JIB

586 Views Asked by At

I'm trying to use the JIB(https://github.com/GoogleContainerTools/jib/) to build my docker image with a custom user.

I believe that I'm not able to create a new user with this library. If I simply define one, I get a message like that unable to find user test-user: no matching entries in passwd file

This is how the jib section look like in build.gradle.kts


jib {
    container {
        mainClass = "com.xxx.xxx.SemApplicationKt"
        ports = listOf("8080/tcp", "9000/tcp")
    }
    to {
        image = "profile-api:test"
        tags = setOf(project.version.toString())
      }
    from {
        image = "BASE_IMAGE"
    }
}

Anyone has any experience on that?

0

There are 0 best solutions below