Skip to content

How to replicate start file that accesses host environment variabels using ENTRYPOINT #578

Open
@d-diaz

Description

@d-diaz

I am trying to get a Dockerfile-based build working through pangeo's binder (original issue posted here), but am running into difficulty replicating the functionality of the start script they have in their cookie cutter recipe.

In a nutshell, that start script replaces some fields in a jupyterlab-workspace.json file by accessing the ${JUPYTERHUB_USER} environment variable on the host machine. However, when I set this start script up as an ENTRYPOINT at the end of my Dockerfile, when the docker image is built and run using pangeo's binder link, it is not accessing this environment variable, and the server is failing to launch because jupyter lab doesn't generate an appropriate workspace in the ENTRYPOINT script. I suspect this is because the pangeo binderhub setup doesn't specify an argument like -e JUPYTERHUB_USER when it calls docker run. Any idea how I can pull host environment variables into my ENTRYPOINT script if the host machine doesn't use this -e flag? It seems like this variable is picked up when the using the start file in the conda buildpack approach, just not when I'm trying to replicate it in a Dockerfile.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions