mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-13 01:22:25 +03:00
Use COPY instead of ADD as per https://docs.docker.com/articles/dockerfile_best-practices/#add-or-copy
This commit is contained in:
parent
c98934d7d5
commit
3d6169c2b9
|
@ -6,16 +6,16 @@ FROM python:2.7
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||||
ADD ./requirements /requirements
|
COPY ./requirements /requirements
|
||||||
|
|
||||||
RUN pip install -r /requirements/production.txt
|
RUN pip install -r /requirements/production.txt
|
||||||
|
|
||||||
RUN groupadd -r django && useradd -r -g django django
|
RUN groupadd -r django && useradd -r -g django django
|
||||||
ADD . /app
|
COPY . /app
|
||||||
RUN chown -R django /app
|
RUN chown -R django /app
|
||||||
|
|
||||||
ADD ./compose/django/gunicorn.sh /gunicorn.sh
|
COPY ./compose/django/gunicorn.sh /gunicorn.sh
|
||||||
ADD ./compose/django/entrypoint.sh /entrypoint.sh
|
COPY ./compose/django/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh
|
RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh
|
||||||
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
|
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
|
||||||
|
|
|
@ -6,16 +6,16 @@ FROM python:2.7
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||||
ADD ./requirements /requirements
|
COPY ./requirements /requirements
|
||||||
|
|
||||||
RUN pip install -r /requirements/local.txt
|
RUN pip install -r /requirements/local.txt
|
||||||
|
|
||||||
RUN groupadd -r django && useradd -r -g django django
|
RUN groupadd -r django && useradd -r -g django django
|
||||||
ADD . /app
|
COPY . /app
|
||||||
RUN chown -R django /app
|
RUN chown -R django /app
|
||||||
|
|
||||||
ADD ./compose/django/gunicorn.sh /gunicorn.sh
|
COPY ./compose/django/gunicorn.sh /gunicorn.sh
|
||||||
ADD ./compose/django/entrypoint.sh /entrypoint.sh
|
COPY ./compose/django/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh
|
RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh
|
||||||
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
|
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
|
||||||
|
|
Loading…
Reference in New Issue
Block a user