From 4c796dfa23bb2af681b27472636c43578fc9dbd7 Mon Sep 17 00:00:00 2001 From: Don Setiawan Date: Wed, 15 May 2024 10:03:00 -0700 Subject: [PATCH] fix: Fix Invalid ELF image error for the shell (#27) --- base-image/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/base-image/Dockerfile b/base-image/Dockerfile index fb049ad..aa03c9c 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -91,6 +91,10 @@ ENTRYPOINT ["/usr/local/bin/_entrypoint.sh", "/srv/start"] # and easier to reason about. # ---------------------- ONBUILD USER root + +# Set default shell for system setup +ONBUILD SHELL ["/bin/sh", "-c"] + # FIXME (?): user and home folder is hardcoded for now # FIXME (?): this line breaks the cache of all steps below ONBUILD COPY --chown=${NB_USER}:${NB_USER} . ${HOME} @@ -98,6 +102,9 @@ ONBUILD COPY --chown=${NB_USER}:${NB_USER} . ${HOME} # Make sure that /opt/conda is owned by non-root user, so we can install additional packages ONBUILD RUN chown -R ${NB_USER}:${NB_USER} ${CONDA_DIR} +# Put the shell back to the micromamba shell +ONBUILD SHELL ["/usr/local/bin/_dockerfile_shell.sh"] + # repo2docker will load files from a .binder or binder directory if # present. We check if those directories exist, and print a diagnostic # message here.