Docker-stacks.scipy-notebook and module installed in another image

Hello, sorry for the basic question. Just getting started with Docker.

I’m using scipy-notebook with docker-compose, using ideas from here

I want to install the zipline library so that the jupyter environment comes pre-packed with it. So far the install fails when I try to use conda or pip, or through a requirements.txt file. it’s a dependency mess.

Zipline provides a docker image in their Github Repo. I have it forked, and you can build the library here:

docker build zipline_py36 https://github.com/lalopey/zipline.git#zipline_py36

or already precompiled here:

docker pull lalopey/zipline:zipline_py36

My question is, since I have an image which already has Zipline, how can I use this image through Dockerfile or compose-build to be able to install Zipline into my scipy-notebook?

Thank you