From 8404e98453239037ac41f28520648883b7a75df7 Mon Sep 17 00:00:00 2001 From: Cian McGrath Date: Tue, 5 Mar 2024 15:28:14 +0000 Subject: [PATCH] Dockerfile: Use requirements-dev for installation of libs Currently the versions are hardcoded. Such that we have a single source of truth, copy the requirements file over and use it Change-Id: I8c51ff7f5a7033c0ff5e55080a0283b865895207 --- Dockerfile | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78d7f681..f2bf3475 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,18 +5,11 @@ FROM python:3.11 LABEL maintainer="cvaas-dev@arista.com" +WORKDIR / +COPY ./requirements*.txt . + # Workaround for https://github.com/yaml/pyyaml/issues/724 -RUN python -m pip install --no-cache-dir "cython<3.0.0" && \ - pip install --no-cache-dir --no-build-isolation pyyaml==6.0.1 +RUN python -m pip install --no-cache-dir "cython<3.0.0" # hadolint ignore=DL3059 -RUN python -m pip install --no-cache-dir \ - msgpack==1.0.3 \ - cryptography==42.0.4 \ - protobuf==4.22.5 \ - numpy==1.22.3 \ - pytest==7.1.2 \ - grpcio==1.53.0 \ - grpcio-tools==1.53.0 \ - flake8==3.8.4 \ - mypy==0.981 +RUN python -m pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt