-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
66 lines (49 loc) · 1.69 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM alpine:latest AS builder
LABEL org.opencontainers.image.authors="[email protected]"
# Set Variables
ARG HIDEME_V=0.9.9
# Download hide.me binary and move binary to copy directory
RUN wget -O /tmp/hide.me_v${HIDEME_V}.tar.gz https://github.com/eventure/hide.client.linux/releases/download/${HIDEME_V}/hide.me-linux-amd64-${HIDEME_V}.tar.gz && \
tar -C /tmp -xvf /tmp/hide.me_v${HIDEME_V}.tar.gz && \
mkdir -p /tmp/copy/usr/bin && \
cp /tmp/hide.me /tmp/copy/usr/bin/hide.me
#
FROM alpine:latest
LABEL org.opencontainers.image.authors="[email protected]"
# Add Packages
RUN apk update && \
apk add --no-cache ca-certificates privoxy runit
# Copy binaries from build stage to main container
COPY --from=builder /tmp/copy/ /
# Timezone (TZ)
ENV TZ=Europe/Berlin
RUN apk update && apk add --no-cache tzdata && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Fix for missing gcc libraries
RUN mkdir /lib64 && \
ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
# Add Bash shell & dependancies
RUN apk add --no-cache bash busybox-suid su-exec screen socat
# Default env variables
ENV HIDEME_SOCKS="on"
ENV HIDEME_PRIVOXY="on"
ENV CA_FILEPATH="/config/cert.pem"
ENV AT_FILEPATH="/config/accessToken.txt"
ENV PR_FILEPATH="/config/privoxy_config"
ENV START_PARAMS=""
ENV TOKEN_PARAMS=""
ENV CONNECTED_CONTAINERS=""
# Volumes
VOLUME /config
# Add Files
RUN chmod +x /usr/bin/hide.me
COPY defaults /opt/defaults
COPY startups /opt/startups
# Add socks5 proxy
COPY socks5 /usr/bin/socks5
RUN chmod +x /usr/bin/socks5
RUN find /opt/startups -name run | xargs chmod u+x
# Add Expose Port
EXPOSE 8080 1080
# Command
CMD ["runsvdir", "/opt/startups"]