sonic-buildimage/dockers/docker-ptf-sai/Dockerfile.j2
Richard.Yu 5d7a345c09
[SAI-PTF][202012]Fix sai ptf 202012 (#12724)
* fix sai-ptf docker build error

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* correct the docker image version

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* update thrift package

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* fix version upgrade issue in 202012

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* remove useless file

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
2022-11-16 20:32:24 -08:00

40 lines
1.1 KiB
Django/Jinja

{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-ptf
# Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Set the apt source, update package cache and install necessary packages
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y \
python3-pip
RUN pip3 install crc16 \
netifaces \
getmac \
packet_helper \
psutil \
scapy_helper \
pysubnettree
COPY \
{% for deb in docker_ptf_sai_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -i \
{% for deb in docker_ptf_sai_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}
# Remove old ptf package
RUN dpkg -r python-ptf
# Install new ptf package not supprt in 202012 branch
# RUN git clone https://github.com/p4lang/ptf.git \
# && cd ptf \
# && python3.7 setup.py install --single-version-externally-managed --record /tmp/ptf_install.txt