Skip to content

Commit cb6e9ed

Browse files
authored
make docker build faster (#167)
1 parent 4c48e10 commit cb6e9ed

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ FROM python:$python_version
33

44
ENV PYTHONDONTWRITEBYTECODE True
55

6-
RUN mkdir -p /test
6+
RUN mkdir -p /test/datadog_lambda
77
WORKDIR /test
88

9+
# Copy minimal subset of files to make pip install succeed and be cached (next docker builds will be way faster)
10+
COPY setup.py .
11+
COPY README.md .
12+
COPY datadog_lambda/__init__.py datadog_lambda/__init__.py
13+
14+
RUN pip install .[dev]
15+
916
# Install datadog-lambda with dev dependencies from local
1017
COPY . .
11-
RUN pip install .[dev]

0 commit comments

Comments
 (0)