Skip to content

Commit

Permalink
Dockerfile: Clean up ADD commands
Browse files Browse the repository at this point in the history
Optimize by copying all files in one command (and the directory in
another) and use COPY instead of ADD. Remove the line that adds . to
the container.

Change-Id: Ia320060ae3977712ac653dee3dcf4393d66198ad
Signed-off-by: Joakim Roubert <joakimr@axis.com>
  • Loading branch information
joakimr-axis committed Mar 11, 2019
1 parent c6c57fc commit 8250f58
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Dockerfile
Expand Up @@ -21,16 +21,10 @@ WORKDIR /code/
RUN pip install virtualenv==16.2.0
RUN pip install tox==2.9.1

ADD requirements.txt /code/
ADD requirements-dev.txt /code/
ADD .pre-commit-config.yaml /code/
ADD setup.py /code/
ADD tox.ini /code/
ADD compose /code/compose/
ADD README.md /code/
COPY requirements.txt requirements-dev.txt .pre-commit-config.yaml setup.py tox.ini README.md /code/
COPY compose /code/compose
RUN tox --notest

ADD . /code/
RUN chown -R user /code/

ENTRYPOINT ["/code/.tox/py37/bin/docker-compose"]

0 comments on commit 8250f58

Please sign in to comment.