Dockerfile.server 597 B

12345678910
  1. # syntax=docker/dockerfile:1
  2. FROM playn/alpine
  3. # ARG version=20210624
  4. RUN export version=$(wget -qO- https://api.github.com/repos/xtaci/kcptun/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g') && \
  5. wget --quiet -O /tmp/kcptun.tar.gz https://github.com/xtaci/kcptun/releases/download/v${version}/kcptun-linux-amd64-${version}.tar.gz && \
  6. tar zxf /tmp/kcptun.tar.gz -C /tmp && \
  7. mv /tmp/server_linux_amd64 /usr/local/bin/kcptun_server && \
  8. rm -rf /tmp/* && \
  9. unset version
  10. ENTRYPOINT ["/usr/local/bin/kcptun_server"]