forked from munkyboy/docker-redsocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 902 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
32
FROM alpine:3.5
RUN apk update && \
apk add bash libevent && \
rm -rf /var/cache/apk/*
ENV DEV_PACKAGES alpine-sdk curl libevent-dev linux-headers
ENV REDSOCKS_VERSION 0.5
RUN apk update && \
apk add -s ${DEV_PACKAGES} > /tmp/temp-packages && \
apk add ${DEV_PACKAGES} && \
curl -sL -o /tmp/redsocks.tar.gz https://github.com/darkk/redsocks/archive/release-0.5.tar.gz && \
cd /tmp && \
tar xfz /tmp/redsocks.tar.gz && \
cd /tmp/redsocks-release-0.5 && \
make && \
mv redsocks /usr/bin && \
rm -rf /tmp/redsocks-release-0.5 && \
cat /tmp/temp-packages | head -n -1 | cut -d " " -f 3 | xargs apk del && \
rm -rf /tmp/redsocks.tar.gz /tmp/temp-packages && \
rm -rf /var/cache/apk/*
RUN redsocks -v
RUN addgroup -g 180 -S redsocks
RUN adduser -u 180 -S redsocks redsocks
ADD redsocks.conf /tmp/
ADD run.sh /run.sh
CMD ["/bin/bash", "/run.sh"]