Skip to content

Commit

Permalink
Slim image without fix-permissions on CONDA_DIR (#790)
Browse files Browse the repository at this point in the history
fixes #789

A layer by layer investigation using docker slim shows how aiidalab-qe image grows, I find an extra layer added with same content by `fix-permissions`. I increase size since it change the file permission which are regarded as different files in OCI bundle.

It is identical in terms of files as the layer with `uv pip install ${QE_APP_SRC}`.
By remove the fix-permission line, the image size goes by more than 600 MB.
  • Loading branch information
unkcpz authored Jul 31, 2024
1 parent 94b92f3 commit ea6b645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ COPY --from=qe_conda_env ${QE_DIR} ${QE_DIR}

USER root
COPY ./before-notebook.d/* /usr/local/bin/before-notebook.d/
RUN fix-permissions "${CONDA_DIR}"

# Remove content of $HOME
# '-mindepth=1' ensures that we do not remove the home directory itself.
RUN find /home/${NB_USER}/ -mindepth 1 -delete
Expand Down

0 comments on commit ea6b645

Please sign in to comment.