Building using a custom Dockerfile

Hi everyone,

I am trying to build a custom container on BinderHub using a Dockerfile. I know that this is not a recommended way of building a binder repository, but I would still like to know a workaround. In fact I already have the prebuilt docker image needed for the build. So I begin with something as simple as

FROM ceciledc/fenics_mixed_dimensional:latest
ENV HOME=/tmp

Of course, this builds fine right off the bat, but the resulting container is rendered unusable.

Any ideas on how to proceed after this? I have tried the instructions given here in order to consume the default NB_UID/NB_USER arguments and create a more sophisticated repo, but haven’t been successful yet.

I am a relatively new user to repo2docker and am still in the process of fully understanding it, but any pointers to possible solutions would be appreciated.

https://github.com/binder-examples/minimal-dockerfile is an example of the minimal Dockerfile needed. We also have a tutorial https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html that might be useful

2 Likes