How to run .sh file when mongodb-atlas-local docker starts

Hello team. I try to run the .sh file when mongodb-atlas-local Docker starts. I was using docker-entrypoint-initdb.d, but it’s not working. I have some checks, and I think mongodb-atlas-local not support it. I hope someone knows about this topic.

This my Docker file:
FROM mongo:7.0.11 AS backup

ARG ATLAS_CONNECTION_STRING

WORKDIR /workspace

COPY --chmod=777 ./backup_data.sh /workspace/

RUN /workspace/backup_data.sh

FROM mongo:7.0.11 as tools

FROM mongodb/mongodb-atlas-local

COPY --from=tools /usr/bin/mongorestore /usr/bin/

COPY --from=tools /usr/lib/ /usr/lib/

RUN mongorestore --version

COPY --chmod=777 ./restore_data.sh /docker-entrypoint-initdb.d/1_restore_data.sh

COPY --from=backup /workspace/backups /backups

ARG IMAGE_DESCRIPTION

LABEL org.opencontainers.image.description=${IMAGE_DESCRIPTION}

Hi @Pham_Hoang_Phuc . Can you add in some echos and then export RUNNER_LOG_FILE=/dev/stdout when you run the resulting image (eg. docker run -e RUNNER_LOG_FILE=/dev/stdout [your-image-name]) so we can check the logs, please?

A couple of other things: you won’t need mongorestore as it’s already included in the mongodb-atlas-local image, and same for /usr/lib/.