invoke start script from our entrypoint

rather than replacing our entrypoint
pull/651/head
Min RK 2019-04-25 15:56:26 +02:00
rodzic 9678dde251
commit 15a23711e6
2 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -154,12 +154,12 @@ RUN ./{{ s }}
# Add start script
{% if start_script is not none -%}
RUN chmod +x "{{ start_script }}"
ENTRYPOINT ["{{ start_script }}"]
{% else %}
ENV R2D_ENTRYPOINT "{{ start_script }}"
{% endif -%}
# Add entrypoint
COPY /repo2docker-entrypoint /usr/local/bin/repo2docker-entrypoint
ENTRYPOINT ["/usr/local/bin/repo2docker-entrypoint"]
{% endif -%}
# Specify the default command to run
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]

Wyświetl plik

@ -2,4 +2,8 @@
# lightest possible entrypoint that ensures that
# we use a login shell to get a fully configured shell environment
# (e.g. sourcing /etc/profile.d, ~/.bashrc, and friends)
exec "$@"
if [[ ! -z "${R2D_ENTRYPOINT:-}" ]]; then
exec "$R2D_ENTRYPOINT" "$@"
else
exec "$@"
fi