Thanks for this great tool. I was using your MFA Docker images and noticed that they are quite large.
The step RUN chown -R mfauser /env effectively doubles the size of the image since it has its own layer and all the files in /env are different due to user privilege changes. This can be prevented by simply chaining the two operations; the installation of the dependencies and the user privilege changes.
This PR rearranges some steps in the Dockerfile and does these two operations in the same Docker image layer. This reduces the size of the image by about half.
Don't hesitate to modify this PR if there are any issues with it.
Thanks for this great tool. I was using your MFA Docker images and noticed that they are quite large.
The step
RUN chown -R mfauser /env
effectively doubles the size of the image since it has its own layer and all the files in /env are different due to user privilege changes. This can be prevented by simply chaining the two operations; the installation of the dependencies and the user privilege changes.This PR rearranges some steps in the Dockerfile and does these two operations in the same Docker image layer. This reduces the size of the image by about half.
Don't hesitate to modify this PR if there are any issues with it.