Skip to content

Commit

Permalink
🚨 Comment Jinja2 syntax to fix hadolint parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoZosa committed Dec 13, 2022
1 parent a5cf716 commit a4cb4d7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions {{cookiecutter.project_slug}}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ ENV PATH="${POETRY_HOME}/bin:${PATH}"
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python && \
poetry --version && \
poetry config --list
{% if cookiecutter.jupyter_notebook_project == 'yes' %}
# {% if cookiecutter.jupyter_notebook_project == 'yes' %}
# Add Tini for Jupyter to prevent kernel crashes
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
{%- endif %}
# {%- endif %}

# Install project dependencies
COPY pyproject.toml poetry.lock /app/
Expand All @@ -43,9 +43,10 @@ RUN poetry install \
# your container image
COPY {{cookiecutter.package_name}} /app/{{cookiecutter.package_name}}

{% if cookiecutter.jupyter_notebook_project == 'yes' %}
# {% if cookiecutter.jupyter_notebook_project == 'yes' %}
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["jupyter", "notebook","--ip='*'", "--port=8888", "--no-browser", "--allow-root"]
{% else %}
# {% else %}
# hadolint ignore=DL4003
CMD ["/app/{{cookiecutter.package_name}}/entrypoint"]
{% endif %}
# {% endif %}

0 comments on commit a4cb4d7

Please sign in to comment.