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

Dockerfile: Adding libsaimetadata dependency #42

Merged
merged 2 commits into from
Oct 26, 2016
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
34 changes: 14 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,27 @@ dockers/docker-team/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)

## Rules: docker-orchagent-mlnx
dockers/docker-orchagent-mlnx/deps/libsairedis_1.0.0_amd64.deb: src/mlnx/libsairedis_1.0.0_amd64.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-orchagent-mlnx/deps/swss_1.0.0_amd64.deb: src/mlnx/swss_1.0.0_amd64.deb
$(addprefix dockers/docker-orchagent-mlnx/deps/,libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb swss_1.0.0_amd64.deb) : dockers/docker-orchagent-mlnx/deps/%.deb : src/mlnx/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-orchagent-mlnx/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)

## Rules: docker-orchagent-cavm
dockers/docker-orchagent-cavm/deps/libsairedis_1.0.0_amd64.deb: src/cavm/libsairedis_1.0.0_amd64.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-orchagent-cavm/deps/swss_1.0.0_amd64.deb: src/cavm/swss_1.0.0_amd64.deb
$(addprefix dockers/docker-orchagent-cavm/deps/,libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb swss_1.0.0_amd64.deb) : dockers/docker-orchagent-cavm/deps/%.deb : src/cavm/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-orchagent-cavm/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)

## Rules: docker-orchagent (brcm)
dockers/docker-orchagent/deps/libsairedis_1.0.0_amd64.deb: src/brcm/libsairedis_1.0.0_amd64.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-orchagent/deps/swss_1.0.0_amd64.deb: src/brcm/swss_1.0.0_amd64.deb
$(addprefix dockers/docker-orchagent/deps/,libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb swss_1.0.0_amd64.deb) : dockers/docker-orchagent/deps/%.deb : src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-orchagent/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)

## Rules: docker-syncd-mlnx
$(addprefix dockers/docker-syncd-mlnx/deps/,$(MLNX-SDK-DEBS)) : dockers/docker-syncd-mlnx/deps/%.deb : src/mlnx-sdk/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
$(addprefix dockers/docker-syncd-mlnx/deps/,syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb) : dockers/docker-syncd-mlnx/deps/%.deb : src/mlnx/%.deb
$(addprefix dockers/docker-syncd-mlnx/deps/,syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb) : dockers/docker-syncd-mlnx/deps/%.deb : src/mlnx/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-syncd-mlnx/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
Expand All @@ -79,21 +73,21 @@ dockers/docker-syncd-mlnx/deps/fw-SPC.mfa: src/mlnx-sdk/fw-SPC.mfa
## Rules: docker-syncd-cavm
$(addprefix dockers/docker-syncd-cavm/deps/,$(CAVM-SDK-DEBS)) : dockers/docker-syncd-cavm/deps/%.deb : src/cavm-sdk/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
$(addprefix dockers/docker-syncd-cavm/deps/,syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb) : dockers/docker-syncd-cavm/deps/%.deb : src/cavm/%.deb
$(addprefix dockers/docker-syncd-cavm/deps/,syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb) : dockers/docker-syncd-cavm/deps/%.deb : src/cavm/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-syncd-cavm/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)

## Rules: docker-syncd (brcm)
$(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS)) : dockers/docker-syncd/deps/%.deb : src/brcm-sdk/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
$(addprefix dockers/docker-syncd/deps/,syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb): dockers/docker-syncd/deps/%.deb : src/brcm/%.deb
$(addprefix dockers/docker-syncd/deps/,syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb): dockers/docker-syncd/deps/%.deb : src/brcm/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-syncd/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)

## Rules: docker-sonic (p4)
$(addprefix dockers/docker-sonic-p4/deps/,swss_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb) : dockers/docker-sonic-p4/deps/%.deb : src/p4/%.deb
$(addprefix dockers/docker-sonic-p4/deps/,swss_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb) : dockers/docker-sonic-p4/deps/%.deb : src/p4/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
dockers/docker-sonic-p4/deps/%.deb: src/%.deb
mkdir -p `dirname $@` && cp $< $(dir $@)
Expand All @@ -102,29 +96,29 @@ dockers/docker-sonic-p4/deps/%.deb: src/%.deb
target/docker-base.gz:
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb syncd_1.0.0_amd64.deb $(LIBNL-DEBS))
target/docker-syncd.gz: target/docker-base.gz $(addprefix dockers/docker-syncd/deps/,$(BRCM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb $(LIBNL-DEBS))
## TODO: remove placeholders for the dependencies
touch dockers/docker-syncd/deps/{dsserve,bcmcmd}
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-syncd-mlnx.gz: target/docker-base.gz $(addprefix dockers/docker-syncd-mlnx/deps/,$(MLNX-SDK-DEBS) applibs_1.mlnx.4.2.2100_amd64.deb libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb $(LIBNL-DEBS)) dockers/docker-syncd-mlnx/deps/fw-SPC.mfa
target/docker-syncd-mlnx.gz: target/docker-base.gz $(addprefix dockers/docker-syncd-mlnx/deps/,$(MLNX-SDK-DEBS) applibs_1.mlnx.4.2.2100_amd64.deb libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb $(LIBNL-DEBS)) dockers/docker-syncd-mlnx/deps/fw-SPC.mfa
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-syncd-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-syncd-cavm/deps/,$(CAVM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb)
target/docker-syncd-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-syncd-cavm/deps/,$(CAVM-SDK-DEBS) libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb syncd_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb $(LIBNL-DEBS))
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-orchagent.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb swss_1.0.0_amd64.deb $(LIBNL-DEBS) $(LIBTEAM-DEBS))
target/docker-orchagent.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb swss_1.0.0_amd64.deb $(LIBNL-DEBS) $(LIBTEAM-DEBS))
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-mlnx/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb swss_1.0.0_amd64.deb $(LIBNL-DEBS) $(LIBTEAM-DEBS))
target/docker-orchagent-mlnx.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-mlnx/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb swss_1.0.0_amd64.deb $(LIBNL-DEBS) $(LIBTEAM-DEBS))
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-orchagent-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb swss_1.0.0_amd64.deb $(LIBNL-DEBS) $(LIBTEAM-DEBS))
target/docker-orchagent-cavm.gz: target/docker-base.gz $(addprefix dockers/docker-orchagent-cavm/deps/,libhiredis0.13_0.13.3-2_amd64.deb libswsscommon_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb swss_1.0.0_amd64.deb $(LIBNL-DEBS) $(LIBTEAM-DEBS))
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

Expand All @@ -140,7 +134,7 @@ target/docker-database.gz: target/docker-base.gz
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

target/docker-sonic-p4.gz: target/docker-base.gz $(addprefix dockers/docker-sonic-p4/deps/,libswsscommon_1.0.0_amd64.deb libhiredis0.13_0.13.3-2_amd64.deb quagga_0.99.24.1-2_amd64.deb syncd_1.0.0_amd64.deb swss_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libthrift-0.9.3_0.9.3-2_amd64.deb redis-server_3.0.7-2_amd64.deb redis-tools_3.0.7-2_amd64.deb p4-bmv2_1.0.0_amd64.deb p4-switch_1.0.0_amd64.deb)
target/docker-sonic-p4.gz: target/docker-base.gz $(addprefix dockers/docker-sonic-p4/deps/,libswsscommon_1.0.0_amd64.deb libhiredis0.13_0.13.3-2_amd64.deb quagga_0.99.24.1-2_amd64.deb syncd_1.0.0_amd64.deb swss_1.0.0_amd64.deb libsairedis_1.0.0_amd64.deb libsaimetadata_1.0.0_amd64.deb libthrift-0.9.3_0.9.3-2_amd64.deb redis-server_3.0.7-2_amd64.deb redis-tools_3.0.7-2_amd64.deb p4-bmv2_1.0.0_amd64.deb p4-switch_1.0.0_amd64.deb)
docker load < $<
$(call build_docker,$(patsubst target/%.gz,%,$@),$@)

Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-orchagent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM docker-base

RUN apt-get update

COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/swss_*.deb", "/deps/"]
COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/libsaimetadata_*.deb", "deps/swss_*.deb", "/deps/"]

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
dpkg_apt /deps/libhiredis0.13*.deb \
Expand All @@ -11,6 +11,7 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
&& dpkg_apt /deps/libnl-route-3-200_*.deb \
&& dpkg_apt /deps/libswsscommon_*.deb \
&& dpkg_apt /deps/libsairedis_*.deb \
&& dpkg_apt /deps/libsaimetadata_*.deb \
&& dpkg_apt /deps/swss_*.deb

RUN apt-get install -f -y ifupdown bridge-utils redis-tools
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-sonic-p4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apt-get update

RUN apt-get install -y net-tools ethtool tcpdump ifupdown

COPY ["deps/libthrift-0.9.3_*.deb", "deps/libhiredis0.13*.deb", "deps/redis-tools_*.deb", "deps/redis-server_*.deb", "deps/libswsscommon_*.deb", "deps/p4-bmv2_*.deb", "deps/p4-switch_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/swss_*.deb", "deps/quagga_*.deb", "/deps/"]
COPY ["deps/libthrift-0.9.3_*.deb", "deps/libhiredis0.13*.deb", "deps/redis-tools_*.deb", "deps/redis-server_*.deb", "deps/libswsscommon_*.deb", "deps/p4-bmv2_*.deb", "deps/p4-switch_*.deb", "deps/libsairedis_*.deb", "deps/libsaimetadata_*.deb", "deps/syncd_*.deb", "deps/swss_*.deb", "deps/quagga_*.deb", "/deps/"]

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libthrift-0.9.3_*.deb
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libhiredis0.13*.deb
Expand All @@ -15,6 +15,7 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/p4-bmv2_*.deb
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/p4-switch_*.deb
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libsairedis_*.deb
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/libsaimetadata_*.deb

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/syncd_*.deb
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/swss_*.deb
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-syncd-cavm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM docker-base

RUN apt-get update

COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "deps/sai*.deb", "deps/libsai*.deb", "deps/xp-tools*.deb", "deps/xpshell*.deb", "/deps/"]
COPY ["deps/libhiredis0.13*.deb", "deps/libswsscommon_*.deb", "deps/libsairedis_*.deb", "deps/libsaimetadata_*.deb", "deps/syncd_*.deb", "deps/sai*.deb", "deps/libsai*.deb", "deps/xp-tools*.deb", "deps/xpshell*.deb", "/deps/"]

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
dpkg_apt /deps/libhiredis0.13*.deb \
Expand All @@ -12,6 +12,7 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
&& dpkg_apt /deps/xp-tools*.deb \
&& dpkg_apt /deps/xpshell*.deb \
&& dpkg_apt /deps/libsairedis_*.deb \
&& dpkg_apt /deps/libsaimetadata_*.deb\
&& dpkg_apt /deps/syncd_*.deb

RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-syncd-mlnx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
&& dpkg_apt /deps/libnl-route-3-200_*.deb \
&& dpkg_apt /deps/libswsscommon_*.deb \
&& dpkg_apt /deps/mlnx-sai_*.deb \
&& dpkg_apt /deps/libsairedis_*.deb
&& dpkg_apt /deps/libsairedis_*.deb \
&& dpkg_apt /deps/libsaimetadata_*.deb

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /deps/syncd_*.deb

Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-syncd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM docker-base

RUN apt-get update

COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libopennsl_*.deb", "deps/libsaibcm_*.deb", "deps/libsairedis_*.deb", "deps/syncd_*.deb", "/deps/"]
COPY ["deps/libhiredis0.13*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "deps/libswsscommon_*.deb", "deps/libopennsl_*.deb", "deps/libsaibcm_*.deb", "deps/libsairedis_*.deb", "deps/libsaimetadata_*.deb", "deps/syncd_*.deb", "/deps/"]

RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
dpkg_apt /deps/libhiredis0.13*.deb \
Expand All @@ -13,6 +13,7 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
&& dpkg_apt /deps/libopennsl_*.deb \
&& dpkg_apt /deps/libsaibcm_*.deb \
&& dpkg_apt /deps/libsairedis_*.deb \
&& dpkg_apt /deps/libsaimetadata_*.deb \
&& dpkg_apt /deps/syncd_*.deb

## TODO: add kmod into Depends
Expand Down
Loading