Last active
January 13, 2019 23:42
-
-
Save krsna1729/c4862f278e74b337177937b6e70cc4a2 to your computer and use it in GitHub Desktop.
BESS Multi-stage Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multi-stage Dockerfile | |
# Stage bess-build: builds bess with its dependencies | |
FROM nefelinetworks/bess_build AS bess-build | |
ARG BESS_COMMIT=master | |
RUN apt-get update && apt-get install -y wget unzip ca-certificates git | |
RUN wget -qO bess.zip https://github.com/NetSys/bess/archive/${BESS_COMMIT}.zip && unzip bess.zip | |
WORKDIR bess-${BESS_COMMIT} | |
RUN ./build.py bess && cp bin/bessd /bin | |
RUN mkdir -p /opt/bess && cp -r bessctl pybess /opt/bess | |
# Stage bess: creates the runtime image of BESS sidecar | |
FROM python:2.7-slim as bess | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
libgraph-easy-perl \ | |
iproute2 \ | |
tcpdump && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
pip install --no-cache-dir \ | |
grpcio \ | |
protobuf \ | |
scapy | |
COPY --from=bess-build /opt/bess /opt/bess | |
COPY --from=bess-build /bin/bessd /bin | |
WORKDIR /opt/bess/bessctl | |
CMD ./bessctl |
Author
krsna1729
commented
Oct 8, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment