Speed up django image build process, and reduce its size

This commit is contained in:
Yuchen Xie 2019-12-09 09:55:37 +08:00
parent 4259af3fd8
commit a88b6b04b6

View File

@ -57,13 +57,11 @@ RUN chmod +x /start-flower
{%- endif %}
{%- if cookiecutter.js_task_runner == 'Gulp' %}
COPY --from=client-builder /app /app
COPY --from=client-builder --chown=django:django /app /app
{% else %}
COPY . /app
COPY --chown=django:django . /app
{%- endif %}
RUN chown -R django /app
USER django
WORKDIR /app