Skip to content

Commit e976627

Browse files
authored
Merge pull request #657 from yuvipanda/abs-start
Make sure ENTRYPOINT is an absolute path
2 parents e352774 + 4dd32f3 commit e976627

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

repo2docker/buildpacks/base.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,12 @@ def get_post_build_scripts(self):
668668
return []
669669

670670
def get_start_script(self):
671-
start = self.binder_path('./start')
671+
start = self.binder_path('start')
672672
if os.path.exists(start):
673-
return start
673+
# Return an absolute path to start
674+
# This is important when built container images start with
675+
# a working directory that is different from ${REPO_DIR}
676+
# This isn't a problem with anything else, since start is
677+
# the only path evaluated at container start time rather than build time
678+
return os.path.join('${REPO_DIR}', start)
674679
return None

0 commit comments

Comments
 (0)