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
from debian:latest
# https://proxenet.readthedocs.io/en/latest/compil/
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y \
    && apt-get install -y git cmake libmbedtls-dev tclsh pkg-config libmbedx509-0 ruby-dev liblua5.2-dev libperl-dev python3-dev python-dev ncat jq \
    && cp /usr/include/x86_64-linux-gnu/ruby-2.5.0/ruby/config.h /usr/include/ruby-2.5.0/ruby/config.h \
    && git clone https://github.com/hugsy/proxenet.git \
    && cd proxenet \
    && cmake .  -DUSE_JAVA_PLUGIN=OFF \
    && make \
    && make install \
    && make -C keys \
    && mkdir ~/.proxenet \
    && cp -r keys  ~/.proxenet \
    && cd ~/.proxenet  \
    && git clone https://github.com/hugsy/proxenet-plugins.git plugins \
    && mkdir plugins/autoload \
    && ln -s /opt/proxenet/bin/proxenet /usr/local/bin/proxenet 
    
# RUN proxenet -b 127.0.0.1 -p 8090 -d
# RUN proxenet -h
# docker build -t proxenet:v0.1 .
# docker run --rm -p80:8008 -it proxenet:v0.1 proxenet -b 0.0.0.0 -v
# docker save eee7c1517197.imagename > proxenet-`date +%Y%m%d`.tar
# docker load < xxx.tar
# echo "version" | ncat -U /tmp/proxenet-control-socket |grep -Po "(?<=>>>).*(?=>>>)" |jq
ENV DEBIAN_FRONTEND newt

构建镜像

1
docker build -t proxenet:v0.1 .

运行容器

1
docker run --rm -p80:8008 -it proxenet:v0.1 proxenet -b 0.0.0.0 -v

导出构建好的镜像

1
docker save eee7c1517197.imagename > proxenet-`date +%Y%m%d`.tar

导入构建好的镜像

1
docker load < xxx.tar

在容器内试用UDP的调试端口

1
echo "version" | ncat -U /tmp/proxenet-control-socket |grep -Po "(?<=>>>).*(?=>>>)" |jq

使用插件🔨

参考资料