-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(docker): review ownership and permission #219
Comments
@moabu While testing the implementation on @jgomer2001 is it possible to override the location of this |
sure! can you open an issue? |
Yep customizing the location should help with that. |
@iromli you have to pass |
@jgomer2001 thanks, i will try it |
@jgomer2001 custom admin lock file works! thanks |
Problems
Current images adjust ownership and permission for several directories and files for non-root user. The issue is some of the commands are using
chown
, for example:Unfortunately, due to docker build limitation, the
chown
command will create extra layer and add the size as huge as thechown
-ed directory/file size.Build using chown command
For illustration, inspecting image layers using
docker images
will show theSIZE
:By using
docker history
command, we know that adjusting ownership and permission viachown
increased the size of the image (approx. 130MB), as seen below:Build without using chown command
Temporarily commenting out
chown
command produces smaller image size:Now the history shows small size while adjusting permission:
Goals
chown
or similar command that changes ownership and permission of directories and fileschown
is inevitable, only adjust specific directories and files (i.e.chown /opt/jans/jetty/casa/logs
instead of/opt/jans/jetty/casa
; the latter containwebapps/casa.war
which is a huge file)The text was updated successfully, but these errors were encountered: