# This Dockerfile is used to build the image available on DockerHub
FROM golang:1.13.4 as build

# Add everything
ADD . /usr/src/multus-cni

ENV GOARCH "arm64"
ENV GOOS "linux"

RUN  cd /usr/src/multus-cni && \
     ./build

# build arm64 container
FROM arm64v8/centos:7
COPY --from=build /usr/src/multus-cni /usr/src/multus-cni

WORKDIR /
ADD ./images/entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]
