-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (22 loc) · 946 Bytes
/
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
FROM ubuntu:18.04
MAINTAINER Ryan Gerstenkorn version: 0.1
WORKDIR /app
ENV PATH /usr/local/go/bin:${PATH}
ENV GOVERSION 1.13
RUN apt-get update && apt-get dist-upgrade -y
RUN apt-get install -y libnetfilter-queue-dev libnetfilter-queue1
RUN apt-get install -y iptables ipset
RUN apt-get install -y sudo netcat iputils-ping wget
RUN apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN wget -q https://dl.google.com/go/go${GOVERSION}.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go${GOVERSION}.linux-amd64.tar.gz && \
rm go${GOVERSION}.linux-amd64.tar.gz
# Hacks for this issue https://github.com/AkihiroSuda/go-netfilter-queue/issues/5
RUN file='/usr/include/linux/netfilter.h' && \
content="$(cat $file)" && \
echo '#include <stdint.h>' >> "${file}" && \
echo "${content}" >> $file
COPY ./ /app/
RUN mkdir -p /go/bin/; go build -o /go/bin/dockersnitch
RUN rm -rf /app
CMD ["/go/bin/dockersnitch"]