Skip to content

Commit

Permalink
Merge pull request #114 from ryanlovett/r2d-base-image
Browse files Browse the repository at this point in the history
Add support for customizing r2d base_image.
  • Loading branch information
ryanlovett authored Mar 10, 2024
2 parents 78e3320 + 9cff64d commit 08fd8d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hubploy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class LocalImage:
"""
A docker image that can be built from a local filesystem source
"""
def __init__(self, name, path, helm_substitution_path='jupyterhub.singleuser.image'):
def __init__(self, name, path, repo2docker={}, helm_substitution_path='jupyterhub.singleuser.image'):
"""
Create an Image from a local path
Expand All @@ -44,6 +44,7 @@ def __init__(self, name, path, helm_substitution_path='jupyterhub.singleuser.ima

self.tag = utils.last_modified_commit(path)
self.path = path
self.repo2docker = repo2docker
self.helm_substitution_path = helm_substitution_path
self.image_spec = f'{self.name}:{self.tag}'

Expand All @@ -54,6 +55,8 @@ def __init__(self, name, path, helm_substitution_path='jupyterhub.singleuser.ima
self.r2d.user_id = 1000
self.r2d.user_name = 'jovyan'
self.r2d.target_repo_dir = '/srv/repo'
if 'base_image' in self.repo2docker:
self.r2d.base_image = repo2docker.get('base_image')
self.r2d.initialize()

@property
Expand Down

0 comments on commit 08fd8d6

Please sign in to comment.