Skip to content

Commit

Permalink
Split Docker images into two parts - base image and platform image (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Kokhan <[email protected]>
  • Loading branch information
andriy-kokhan authored Jun 4, 2022
1 parent 7ad866d commit 08625e3
Show file tree
Hide file tree
Showing 46 changed files with 836 additions and 515 deletions.
37 changes: 4 additions & 33 deletions Dockerfile.saivs → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,10 @@ RUN git clone --recursive https://github.com/Azure/sonic-swss-common \

WORKDIR /sai

RUN git clone https://github.com/Azure/sonic-sairedis.git \
&& cd sonic-sairedis \
&& . /sai.env \
&& git checkout ${SAIREDIS_ID} \
&& git submodule update --init --recursive \
&& cd SAI && git fetch origin \
&& git checkout ${SAI_ID} \
&& git submodule update --init --recursive \
&& cd .. \
&& ./autogen.sh && ./configure --with-sai=vs && make -j4 \
&& make install && ldconfig \
&& mkdir -p /usr/include/sai \
&& mv SAI/experimental /usr/include/sai/experimental \
&& mv SAI/inc /usr/include/sai/inc \
&& mkdir -p /usr/include/sai/meta \
&& cp SAI/meta/*.h /usr/include/sai/meta/ \
&& mv tests .. && rm -rf * && mv ../tests .


# Build attr_list_generator and generate /etc/sai/sai.json
# Install SAI attributes metadata JSON generator
COPY scripts/gen_attr_list /sai/gen_attr_list

RUN apt-get install -y nlohmann-json-dev
RUN cd /sai/gen_attr_list \
&& mkdir build && cd build \
&& cmake .. \
&& make -j$(nproc) \
&& mkdir -p /etc/sai \
&& ./attr_list_generator > /etc/sai/sai.json \
&& rm -rf /sai/gen_attr_list


# Install ptf_nn_agent dependencies
RUN apt-get install -y libffi-dev \
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
Expand Down Expand Up @@ -118,11 +91,9 @@ RUN sed -ri 's/^# unixsocket/unixsocket/' /etc/redis/redis.conf \
RUN sed -ri '/imklog/s/^/#/' /etc/rsyslog.conf

# Setup supervisord
COPY scripts/sai.profile /etc/sai.d/sai.profile
COPY scripts/lanemap.ini /usr/share/sonic/hwsku/lanemap.ini
COPY scripts/redis_start.sh /usr/bin/redis_start.sh
COPY scripts/veth-create.sh /usr/bin/veth-create.sh
COPY scripts/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY scripts/redis_start.sh /usr/bin/redis_start.sh
COPY configs/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Install PTF dependencies
RUN pip3 install scapy
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.client
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN apt-get install -y libffi-dev cmake wget \
# Disable kernel logging support
RUN sed -ri '/imklog/s/^/#/' /etc/rsyslog.conf

COPY scripts/client/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY configs/client/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY scripts/veth-create.sh /usr/bin/veth-create.sh

WORKDIR /sai-challenger/tests
Expand Down
167 changes: 0 additions & 167 deletions Dockerfile.sai.server

This file was deleted.

159 changes: 0 additions & 159 deletions Dockerfile.saivs.intel

This file was deleted.

Loading

0 comments on commit 08625e3

Please sign in to comment.