Search code examples
dockerjupyter-notebookconfluent-kafka-python

Jupiter Docker: Using pip install in a child docker image


I was trying to run a custom version of a Jupiter notebook image on MacOS, just wanted to install a confluent-kafka library in order to use the kafka python client.

I followed the simple instruction provided in the docs. This is the Dockerfile:

FROM jupyter/datascience-notebook:33add21fab64
# Install in the default python3 environment
RUN pip install --quiet --no-cache-dir confluent-kafka && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

The build works fine but when running this is the error I am getting:

[FATAL tini (8)] exec -- failed: No such file or directory

Trying to look online but haven't found anything useful. Any help?


Solution

  • I am still not sure why the error and would be curious to understand that better. In the meanwhile I got the notebook working on docker using another base image.

    Here it is the Dockerfile:

    FROM jupyter/minimal-notebook
    RUN pip3 install confluent-kafka