Skip to content

Instantly share code, notes, and snippets.

@dyusupov
Last active June 3, 2019 01:57
Show Gist options
  • Save dyusupov/71df482c6dc0ea356c9894387b31df51 to your computer and use it in GitHub Desktop.
Save dyusupov/71df482c6dc0ea356c9894387b31df51 to your computer and use it in GitHub Desktop.
multus dockerfile
############################################################
# Dockerfile to build Multus init container image
# Based on Ubuntu
############################################################
# Set the base image to Ubuntu to produce amd64 binary
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y wget git
RUN wget -c https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
RUN tar xzf go1.8.linux-amd64.tar.gz
RUN mv go /usr/local/
RUN ln -s /usr/local/go/bin/go /usr/bin/go
RUN go version
RUN git clone https://github.com/Intel-Corp/multus-cni.git /usr/src/multus-cni
WORKDIR /usr/src/multus-cni
RUN ./build
WORKDIR /
FROM alpine:latest
MAINTAINER Guy
LABEL description="Multus Init Container"
WORKDIR /
COPY --from=0 /usr/src/multus-cni/bin/multus /
CMD cp /multus /opt/cni/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment