-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 1.39 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#------------------------------------------------------------------------------
# Set the base image for subsequent instructions:
#------------------------------------------------------------------------------
FROM alpine:3.6
MAINTAINER Marc Villacorta Morera <marc.villacorta@gmail.com>
#------------------------------------------------------------------------------
# Environment variables:
#------------------------------------------------------------------------------
ENV VERSION="0.6.0" \
CGO_ENABLED="0"
#------------------------------------------------------------------------------
# Install:
#------------------------------------------------------------------------------
RUN apk add --no-cache -U -t deps git go bash musl-dev \
&& git clone https://github.com/containernetworking/cni.git \
&& cd cni && git checkout tags/v${VERSION} -b build \
&& ./build.sh && mkdir /cni-plugins; mv bin/* /cni-plugins \
&& apk del --purge deps && rm -rf /cni /var/cache/apk/*
#------------------------------------------------------------------------------
# Populate root file system:
#------------------------------------------------------------------------------
ADD rootfs /
#------------------------------------------------------------------------------
# Entrypoint:
#------------------------------------------------------------------------------
WORKDIR /cni-plugins
ENTRYPOINT ["/init"]