update frpc.
This commit is contained in:
parent
2d72b4f407
commit
e489058393
|
@ -1,14 +1,18 @@
|
|||
FROM amd64/alpine:3.19
|
||||
FROM amd64/alpine:3.18
|
||||
|
||||
LABEL maintainer="amass <168062547@qq.com>"
|
||||
|
||||
ENV FRP_VERSION 0.57.0
|
||||
ENV FRP_VERSION 0.58.1
|
||||
|
||||
RUN apk add openssl curl ca-certificates \
|
||||
&& printf "%s%s%s%s\n" "@nginx " "http://nginx.org/packages/alpine/v" `egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` "/main" | tee -a /etc/apk/repositories \
|
||||
&& curl -o /etc/apk/keys/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
|
||||
&& apk add nginx@nginx \
|
||||
&& rm /etc/nginx/nginx.conf
|
||||
&& wget 'http://openresty.org/package/admin@openresty.com-5ea678a6.rsa.pub' \
|
||||
&& mv 'admin@openresty.com-5ea678a6.rsa.pub' /etc/apk/keys/ \
|
||||
&& . /etc/os-release \
|
||||
&& MAJOR_VER=`echo $VERSION_ID | sed 's/\.[0-9]\+$//'` \
|
||||
&& echo "http://openresty.org/package/alpine/v$MAJOR_VER/main" | tee -a /etc/apk/repositories \
|
||||
&& apk update \
|
||||
&& apk add openresty openresty-resty openresty-opm \
|
||||
&& opm get bungle/lua-resty-session
|
||||
|
||||
RUN cd /root \
|
||||
&& wget --no-check-certificate -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz \
|
||||
|
@ -21,11 +25,10 @@ RUN cd /root \
|
|||
&& rm frp_${FRP_VERSION}_linux_amd64.tar.gz \
|
||||
&& rm -rf frp_${FRP_VERSION}_linux_amd64/
|
||||
|
||||
ENTRYPOINT if [ -f /etc/nginx/nginx.conf ]; then nginx; fi; /usr/bin/frpc -c /etc/frp/frpc.toml
|
||||
ENTRYPOINT if [ -d /app ]; then cd /app && openresty -p /app; fi; /usr/bin/frpc -c /etc/frp/frpc.toml
|
||||
|
||||
|
||||
|
||||
# docker build --progress tty -f frpc.dockerfile -t frpc:0.57.0 .
|
||||
# docker build --progress tty -f frpc.dockerfile -t frpc:0.58.1 .
|
||||
# docker login --username=168062547@qq.com registry.cn-shenzhen.aliyuncs.com
|
||||
# docker tag frpc:0.57.0 registry.cn-shenzhen.aliyuncs.com/amass_toolset/frpc:0.57.0
|
||||
# docker push registry.cn-shenzhen.aliyuncs.com/amass_toolset/frpc:0.57.0
|
||||
|
|
47
ubuntu2404.dockerfile
Normal file
47
ubuntu2404.dockerfile
Normal file
|
@ -0,0 +1,47 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
LABEL maintainer="amass <168062547@qq.com>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& apt update \
|
||||
&& apt install -y gcc g++ cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
|
||||
wget curl rsync lsb-release ubuntu-keyring gnupg2 \
|
||||
&& install -m 0755 -d /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \
|
||||
&& chmod a+r /etc/apt/keyrings/docker.asc \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||
&& wget -O - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/openresty.list > /dev/null \
|
||||
&& curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
|
||||
&& apt update \
|
||||
&& apt install -y docker-ce-cli openresty nodejs
|
||||
|
||||
RUN mkdir /var/run/sshd \
|
||||
&& sed -i 's/#Port 22/Port 1022/' /etc/ssh/sshd_config \
|
||||
&& sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config \
|
||||
&& mkdir -p /root/.ssh \
|
||||
&& wget https://frp-by1.wwvvww.cn:44048/s/id_rsa_amass_publickey/download -O /root/.ssh/authorized_keys \
|
||||
&& chmod 600 /root/.ssh/authorized_keys && chown root:root /root/.ssh/authorized_keys
|
||||
|
||||
EXPOSE 1022
|
||||
|
||||
RUN git config --global user.email "168062547@qq.com" \
|
||||
&& git config --global user.name "amass"
|
||||
|
||||
RUN cd /root \
|
||||
&& wget https://frp-by1.wwvvww.cn:44048/s/boost_1_85_0/download -O boost_1_85_0.tar.gz \
|
||||
&& tar xvf boost_1_85_0.tar.gz > /dev/null \
|
||||
&& cd /root/boost_1_85_0 \
|
||||
&& ./bootstrap.sh --prefix=/opt/Libraries/boost_1_85_0 \
|
||||
&& ./b2 install -q --prefix=/opt/Libraries/boost_1_85_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC \
|
||||
&& rm -fr /root/boost_1_85_0*
|
||||
|
||||
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/Libraries/boost_1_85_0/lib"
|
||||
|
||||
CMD ["service", "ssh", "start", "-D"]
|
||||
|
||||
# docker build --progress=tty -f ubuntu2404.dockerfile -t ubuntu_dev:24.04 .
|
||||
# docker tag ubuntu_dev:24.04 192.168.2.3:5000/ubuntu_dev:24.04
|
||||
# docker push 192.168.2.3:5000/ubuntu_dev:24.04
|
Loading…
Reference in New Issue
Block a user