Commit d3610e62 authored by 神楽坂玲奈's avatar 神楽坂玲奈

init

parent 219ffeba
Pipeline #4659 failed with stages
FROM debian:bullseye as frp
ENV FRP_VERSION=0.37.1
WORKDIR /usr/src/app
ADD https://github.com/fatedier/frp/releases/download/v0.37.1/frp_0.37.1_linux_amd64.tar.gz ./
RUN tar xf frp_0.37.1_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 mv frp_${FRP_VERSION}_linux_amd64 frp
# https://github.com/masipcat/wireguard-go-docker/blob/master/Dockerfile
FROM golang:1.16-buster as wireguard
ARG wg_go_tag=0.0.20210424
ARG wg_tools_tag=v1.0.20210424
RUN git clone --depth 1 --branch $wg_go_tag https://git.zx2c4.com/wireguard-go && \
cd wireguard-go && \
make && \
make install
ENV WITH_WGQUICK=yes
RUN git clone --depth 1 --branch $wg_tools_tag https://git.zx2c4.com/wireguard-tools && \
cd wireguard-tools && \
cd src && \
make && \
make install
FROM debian:bullseye
RUN apt update && apt install -y \
supervisor \
RUN apt update && apt install --no-install-recommends -y \
supervisor openssh-server python3 iptables iproute2 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=frp /usr/src/app/frp_0.37.1_linux_amd64/ /opt/frp
COPY --from=frp /usr/src/app/frp /opt/frp
RUN mkdir -p /var/run/sshd
COPY --from=wireguard /usr/bin/wireguard-go /usr/bin/wg* /usr/bin/
COPY supervisord.conf /etc/supervisord.conf
EXPOSE 22
CMD ["/usr/bin/supervisord"]
\ No newline at end of file
......@@ -4,5 +4,6 @@ nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
[program:pythonapp]
command=/path/to/python myapp.py -x args etc etc
\ No newline at end of file
[program:frpc]
directory=/opt/frp
command=/opt/frp/frpc
\ No newline at end of file
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