Commit 311c7d04 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent d3610e62
FROM debian:bullseye as frp FROM debian:bullseye as frp
ENV FRP_VERSION=0.37.1 ENV FRP_VERSION=0.37.1
WORKDIR /usr/src/app
ADD https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz ./ ADD https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz ./
RUN tar xf frp_${FRP_VERSION}_linux_amd64.tar.gz RUN tar xf frp_${FRP_VERSION}_linux_amd64.tar.gz
RUN mv frp_${FRP_VERSION}_linux_amd64 frp RUN mv frp_${FRP_VERSION}_linux_amd64 frp
COPY frpc.ini frp/
# https://github.com/masipcat/wireguard-go-docker/blob/master/Dockerfile # https://github.com/masipcat/wireguard-go-docker/blob/master/Dockerfile
FROM golang:1.16-buster as wireguard FROM golang:1.16-buster as wireguard
...@@ -28,14 +28,15 @@ RUN git clone --depth 1 --branch $wg_tools_tag https://git.zx2c4.com/wireguard-t ...@@ -28,14 +28,15 @@ RUN git clone --depth 1 --branch $wg_tools_tag https://git.zx2c4.com/wireguard-t
FROM debian:bullseye FROM debian:bullseye
RUN apt update && apt install --no-install-recommends -y \ RUN apt update && apt install --no-install-recommends -y \
supervisor openssh-server python3 iptables iproute2 \ supervisor openssh-server python3 iptables iproute2 babeld \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY --from=frp /usr/src/app/frp /opt/frp COPY --from=frp /frp /opt/frp
RUN mkdir -p /var/run/sshd RUN mkdir -p /var/run/sshd
COPY --from=wireguard /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/ COPY --from=wireguard /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/
COPY supervisord.conf /etc/supervisord.conf COPY supervisord.conf /etc/supervisord.conf
COPY entrypoint.sh /
EXPOSE 22 EXPOSE 22
CMD ["/usr/bin/supervisord"] CMD ["/entrypoint.sh"]
\ No newline at end of file \ No newline at end of file
#!/bin/bash
sed -i "/^remote_port =/s/= .*/= ${frpc}/" /opt/frp/frpc.ini
supervisord
\ No newline at end of file
[common]
server_addr = 121.46.232.12
server_port = 7001
tcp_mux = true
protocol = tcp
token = hst4jy6uwy53qsehtu46
[frpc_ssh_JJzxdidQ]
privilege_mode = true
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 40030
use_encryption = true
use_compression = true
\ No newline at end of file
[supervisord] [supervisord]
nodaemon=true nodaemon=true
[unix_http_server]
file=/tmp/supervisor.sock
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:sshd] [program:sshd]
command=/usr/sbin/sshd -D command=/usr/sbin/sshd -D
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment