-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (26 loc) · 866 Bytes
/
Dockerfile
File metadata and controls
29 lines (26 loc) · 866 Bytes
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
FROM alpine:3.6
COPY . /work/
RUN cd /work && \
apk update && \
apk add go=1.8.3-r0 git musl-dev && \
apk add ethtool ipfw iptables ip6tables iproute2 sudo && \
mkdir -p gopath/src/github.com/tylertreat && \
ln -s $(pwd)/comcast gopath/src/github.com/tylertreat/ && \
export GOPATH=$(pwd)/gopath && \
\
cd comcast && \
patch -p1 <../docker-comcast.patch && \
go get -d . && \
go test -v ./... && \
go build . && \
cd .. && \
\
apk del go git musl-dev && \
rm -r gopath /var/cache/* && \
\
rm /usr/bin/nsenter && \
ln -s $(pwd)/nsenter-2015-07-28 /usr/bin/nsenter && \
ln -s $(pwd)/findveth.sh /usr/bin/ && \
ln -s $(pwd)/comcast/comcast /usr/bin/
# Needed to make sure the actual application of rules happens
ENTRYPOINT ["nsenter", "--target", "1", "--net", "comcast"]