How to prevent running a command in a Docker image [closed]

I’m new to Docker. The image I am using is kaggle/python https://github.com/Kaggle/docker-python/blob/main/Dockerfile

Using this image, I would like to create a new image which:

(1) Has some more packages

(2) Prevents Jupyter from starting up automatically each time the container is run (the source image does this – I can’t seem to find the command in the docker file where this is invoked)

Edit: I have found the line where Jupyter is invoked, however I am unsure as to how it can get ignored in my new image

python -m nb_conda_kernels.install --disable

Thank you 🙂

Answer

This barebones Dockerfile should get you going.

FROM kaggle/python

# Add more stuff here, for example
# RUN pip install Boruta
# RUN apt-get install -y graphviz && pip install graphviz

# if you make your own startup script called entrypoint.sh:
# WORKDIR /
# COPY entrypoint.sh .

ENTRYPOINT [ "/usr/bin/env" ]

# if you made your own startup script
# RUN ["/entrypoint.sh"]
# else
RUN ["bash"]