Dockerfile 890 B

1234567891011121314151617181920
  1. FROM alpine:edge AS builder
  2. ARG TARGETPLATFORM
  3. ARG BUILDPLATFORM
  4. WORKDIR /
  5. 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
  6. RUN git clone https://github.com/gjedeer/tuntox.git /tuntox && cd /tuntox && make tuntox
  7. FROM alpine:latest
  8. COPY scripts/tokssh /usr/bin/tokssh
  9. COPY --from=0 /tuntox/tuntox /usr/bin/tuntox
  10. RUN chmod +x /usr/bin/tuntox /usr/bin/tokssh && \
  11. mkdir /data
  12. EXPOSE 33446/tcp
  13. EXPOSE 33446:33447/udp
  14. CMD ["/usr/bin/tuntox", "-C", "/data", "-t", "33446", "-u", "33446:33447", "-d"]