From 3d6169c2b9ec73db5eb1c1d52b5ff2ceb90a1d7b Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 22 Oct 2015 12:35:55 -0700 Subject: [PATCH] Use COPY instead of ADD as per https://docs.docker.com/articles/dockerfile_best-practices/#add-or-copy --- {{cookiecutter.repo_name}}/Dockerfile | 8 ++++---- {{cookiecutter.repo_name}}/Dockerfile-dev | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/{{cookiecutter.repo_name}}/Dockerfile b/{{cookiecutter.repo_name}}/Dockerfile index 2a038555..08d43f61 100644 --- a/{{cookiecutter.repo_name}}/Dockerfile +++ b/{{cookiecutter.repo_name}}/Dockerfile @@ -6,16 +6,16 @@ FROM python:2.7 ENV PYTHONUNBUFFERED 1 # 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 groupadd -r django && useradd -r -g django django -ADD . /app +COPY . /app RUN chown -R django /app -ADD ./compose/django/gunicorn.sh /gunicorn.sh -ADD ./compose/django/entrypoint.sh /entrypoint.sh +COPY ./compose/django/gunicorn.sh /gunicorn.sh +COPY ./compose/django/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh diff --git a/{{cookiecutter.repo_name}}/Dockerfile-dev b/{{cookiecutter.repo_name}}/Dockerfile-dev index f382b913..7f9985ba 100644 --- a/{{cookiecutter.repo_name}}/Dockerfile-dev +++ b/{{cookiecutter.repo_name}}/Dockerfile-dev @@ -6,16 +6,16 @@ FROM python:2.7 ENV PYTHONUNBUFFERED 1 # 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 groupadd -r django && useradd -r -g django django -ADD . /app +COPY . /app RUN chown -R django /app -ADD ./compose/django/gunicorn.sh /gunicorn.sh -ADD ./compose/django/entrypoint.sh /entrypoint.sh +COPY ./compose/django/gunicorn.sh /gunicorn.sh +COPY ./compose/django/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh