Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ LABEL maintainer="Pavel Shirshov"

COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"]
COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"]
COPY ["apt-retries-count", "/etc/apt/apt.conf.d"]

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -266,6 +267,18 @@ RUN dpkg -i \
debs/{{ deb }}{{' '}}
{%- endfor %}

{% if PTF_ENV_PY_VER == "py3" %}
# Create symlink so that test scripts and ptf_runner invocation path
# is same across python 2 and python 3 envs. Note that for virtual-env
# ptf is under /root/env-python3/bin.
# TODO - cleanup when the supported PTF image is py3only across all branches
RUN mkdir -p /root/env-python3/bin \
&& ln -s /usr/local/bin/ptf /usr/bin/ptf \
&& ln -s /usr/bin/python /root/env-python3/bin/python3 \
&& ln -s /usr/bin/python /root/env-python3/bin/python \
&& ln -s /usr/local/bin/ptf /root/env-python3/bin/ptf
{% endif %}

COPY ["*.ini", "/etc/ptf/"]
EXPOSE 22 8009

Expand Down