Reputation: 353
I am converting from dockerfile to jib so earlier my images were created using docker and now they are being created using jib. Dockerfile had some lines like: USER trent RUN chmod 770 -R /usr/local/tomcat/ RUN chown -R trent:app /usr/local/tomcat/ similarly few more commands to change the permission to folders which are inside timcat and also wepapps. And also to change the ownership. Could you suggest how this could be done? Right now I have one file(setenv.sh and web.xml) which i could give permissions to and also change the ownership like shown below:
jib {
extraDirectories {
paths {
path {
from = 'temp/'
into = '/usr/local/tomcat/bin/'
includes = ['setenv.sh']
}
path {
from = 'temp/'
into = '/usr/local/tomcat/webapps/ems/WEB-INF/'
includes = ['web.xml']
}
}
permissions = [
'/usr/local/tomcat/bin/setenv.sh': '770',
'/usr/local/tomcat/webapps/ems/WEB-INF/web.xml': '770'
]
}
pluginExtensions {
pluginExtension {
implementation = "com.google.cloud.tools.jib.gradle.extension.ownership.JibOwnershipExtension"
configuration{
rules {
rule {
glob = '/usr/local/tomcat/bin/setenv.sh'
ownership = '1001:501'
}
rule {
glob = '/usr/local/tomcat/'
ownership = '1001:501'
}
rule {
glob = '/usr/local/tomcat/**'
ownership = '1001:501'
}
}
}
}
}
The above lines do not work for tomcat folder and its subdirectories,I dont know how to change the ownership of directories which are inside tomcat like my project, wepabbs etc. Could anyone suggest some way? Thank you so much in advance!
Upvotes: 0
Views: 200