Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Docker images into two parts - base image and platform image #4

Merged
Merged
Show file tree
Hide file tree
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
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