Skip to content

Commit 915fc8d

Browse files
author
Joseph Hamman
committed
update after talking to @yuvipanda
1 parent 0595471 commit 915fc8d

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

repo2docker/buildpacks/base.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,11 @@
131131
{% endfor %}
132132
{% endif -%}
133133
134-
# Add launch script
134+
# Add start script
135135
{% if start_script -%}
136-
RUN echo '#!/bin/bash \nexec {{ start_script }} $@ \n' > ${HOME}/launch
137-
RUN chmod +x {{ start_script }}
138-
{% else %}
139-
RUN echo '#!/bin/bash \nexec $@ \n' > ${HOME}/launch
136+
RUN chmod +x "{{ start_script }}"
137+
ENTRYPOINT ["{{ start_script }}"]
140138
{% endif -%}
141-
RUN chmod +x ${HOME}/launch
142-
143-
# Run launch script
144-
ENTRYPOINT ["${HOME}/launch"]
145139
146140
# Specify the default command to run
147141
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]
@@ -358,7 +352,7 @@ def get_start_script(self):
358352
should not produce different results.
359353
360354
"""
361-
return []
355+
return ''
362356

363357
def binder_path(self, path):
364358
"""Locate a file"""
@@ -549,7 +543,7 @@ def get_post_build_scripts(self):
549543
return []
550544

551545
def get_start_script(self):
552-
launch = self.binder_path('start')
553-
if os.path.exists(launch):
554-
return launch
546+
start = self.binder_path('start')
547+
if os.path.exists(start):
548+
return start
555549
return ''

0 commit comments

Comments
 (0)