-
Notifications
You must be signed in to change notification settings - Fork 58
/
Dockerfile
19 lines (14 loc) · 890 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM alpine:edge AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
WORKDIR /
RUN uname -a && echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && apk add gcc g++ git make musl-dev cmake linux-headers libsodium-dev libsodium-static && git clone https://github.com/TokTok/c-toxcore.git /c-toxcore && cd /c-toxcore/ && git submodule update --init && cd /c-toxcore/build/ && cmake .. -DBUILD_TOXAV=OFF -DBOOTSTRAP_DAEMON=off -DBUILD_AV_TEST=off -DFULLY_STATIC=on && make && make install
RUN git clone https://github.com/gjedeer/tuntox.git /tuntox && cd /tuntox && make tuntox
FROM alpine:latest
COPY scripts/tokssh /usr/bin/tokssh
COPY --from=0 /tuntox/tuntox /usr/bin/tuntox
RUN chmod +x /usr/bin/tuntox /usr/bin/tokssh && \
mkdir /data
EXPOSE 33446/tcp
EXPOSE 33446:33447/udp
CMD ["/usr/bin/tuntox", "-C", "/data", "-t", "33446", "-u", "33446:33447", "-d"]