Update the Dockerfile to utilise the Pipenv dependency manager
@@ -2,8 +2,20 @@ FROM python:3.7
ENV PYTHONBUFFERED 1
-RUN mkdir /cccatalog-api
-RUN mkdir -p /var/log/cccatalog-api/cccatalog-api.log
+RUN mkdir /cccatalog-api \
+ && mkdir -p /var/log/cccatalog-api/cccatalog-api.log
+
WORKDIR /cccatalog-api
-ADD requirements.txt /cccatalog-api/
-RUN pip install -r requirements.txt
+
+# Install Python dependency management tools
+RUN pip install --upgrade pip \
+ && pip install --upgrade setuptools \
+ && pip install --upgrade pipenv
+
+# Copy the Pipenv files into the container
+COPY Pipfile /cccatalog-api/
+COPY Pipfile.lock /cccatalog-api/
+
+# Install the dependencies system-wide
+# TODO: Use build args to avoid installing dev dependencies in production
+RUN pipenv install --deploy --system --dev
