repo2docker
repo2docker copied to clipboard
[MRG] Improve docs on Dockerfile escape hatch
I was struggling to find how to get the generated Dockerfile contents. When I found it, I thought I'd open a PR to add a link from the first place I looked for the next person who struggles :)
Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
I experienced some unexpected behavior and added a warning to the docs :point_up:
I feel like more documentation is needed. When I create a Dockerfile following these instructions and attempt to build, there are errors because the Dockerfile references paths that aren't in the build context:
Step 26/60 : COPY --chown=1002:1002 build_script_files/-2fhome-2fmfisher-2f-2eminiconda3-2fenvs-2frepo2docker-2flib-2fpython3-2e11-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2factivate-2dconda-2esh-cf5cc0 /etc/profile.d/activate-conda.sh
COPY failed: file not found in build context or excluded by .dockerignore: stat build_script_files/-2fhome-2fmfisher-2f-2eminiconda3-2fenvs-2frepo2docker-2flib-2fpython3-2e11-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2factivate-2dconda-2esh-cf5cc0: file does not exist(repo2docker)
When I remove those steps, later steps fail because mamba and conda are both unavailable. What else can I do to document the process of switching from a non-Dockerfile config to a Dockerfile-based config?
The debug output is just for debugging, it's not intended to be buildable since you also need the full context that's created on the fly, and I don't think we should recommend it as a way to create a Dockerfile.
I've got a playground/proof-of-concept in https://github.com/manics/repo2shellscript if you're interested in seeing the full complexity.
Thanks @manics! Is there anything that can be documented about migrating from a config-file based build to a Dockerfile-based build? Does repo2docker provide any value add for that use case? I'm struggling with a build that has broken man pages, and I'm not seeing a repo2docker path to fixing it right now (since I think I need to do stuff as root to fix the issue).
https://github.com/jupyterhub/repo2docker/issues/700
Here's how I solved my problem: https://github.com/CryoInTheCloud/hub-image/pull/65
As you know, I totally missed the "Can I use repo2docker to bootstrap my own Dockerfile?" FAQ on my first time through :laughing: I've added a link to it where I would have seen it my first time through and replaced my bad suggestions with hopefully better ones, in addition to a new FAQ to resolve the specific problem with man pages.