Using the --chown flag during COPY is much faster than running
chown -R. It also removes a layer from the image, resulting in faster
and smaller builds.
Motivation and Context
[x] I have raised an issue to propose this change (required)
[x] My issue has received approval from the maintainers or lead with the design/approved label
Resolves #55
How Has This Been Tested?
$ faas-cli new echo0 --lang python3-flask
$ faas-cli new echo1 --lang python3-http
$ faas-cli build -f echo0.yml --no-cache
# truncated
Image: echo0:latest built.
[0] < Building echo0 done in 37.65s.
[0] Worker done.
Total build time: 37.65s
$ faas-cli build -f echo1.yml --no-cache
# truncated
Image: echo1:latest built.
[0] < Building echo1 done in 32.50s.
[0] Worker done.
Total build time: 32.50s
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Using the
--chown
flag duringCOPY
is much faster than runningchown -R
. It also removes a layer from the image, resulting in faster and smaller builds.Motivation and Context
design/approved
labelResolves #55
How Has This Been Tested?
Types of changes
Checklist:
git commit -s