I am new to multistage builds and using chown -R appuser:appuser /app
# Copy the virtual environment
COPY --from=builder --chown=appuser:appuser ${VIRTUAL_ENV} ${VIRTUAL_ENV}
# Copy application code
COPY --from=builder --chown=appuser:appuser /app /app
vs
# Copy the virtual environment
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
# Copy application code
COPY --from=builder /app /app
RUN chown -R appuser:appuser /app
There is a difference of 4GB. am i missing something here? The first approach uses close to 20GB while the second only uses 16GB