Dockerfiles/ubuntu2204.dockerfile

65 lines
3.5 KiB
Plaintext
Raw Normal View History

2024-06-25 21:16:53 +08:00
FROM ubuntu:22.04
2024-06-30 22:33:23 +08:00
LABEL maintainer="amass <168062547@qq.com>"
2024-06-25 21:16:53 +08:00
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list \
&& sed -i "s@http://.*security.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list \
&& apt update \
&& apt install -y gcc g++ cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
2024-06-30 22:33:23 +08:00
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev gettext jq \
2024-06-25 21:16:53 +08:00
&& 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 git config --global core.quotepath false \
&& git config --global user.email "168062547@qq.com" \
&& git config --global user.name "amass"
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
2024-08-19 23:32:37 +08:00
EXPOSE 1022
2024-06-25 21:16:53 +08:00
RUN git config --global user.email "168062547@qq.com" \
&& git config --global user.name "amass"
RUN cd /root \
2024-08-19 23:25:02 +08:00
&& wget https://frp-by1.wwvvww.cn:44048/s/boost_1_86_0/download -O boost_1_86_0.tar.gz \
&& tar xvf boost_1_86_0.tar.gz > /dev/null \
&& cd /root/boost_1_86_0 \
&& ./bootstrap.sh --prefix=/opt/Libraries/boost_1_86_0 \
&& ./b2 install -q --prefix=/opt/Libraries/boost_1_86_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC \
2024-09-23 21:17:27 +08:00
&& echo 'export LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:$LD_LIBRARY_PATH' >> /etc/profile \
2024-08-19 23:25:02 +08:00
&& rm -fr /root/boost_1_86_0*
2024-09-23 21:17:27 +08:00
RUN cd /root \
&& git clone --depth=1 --recursive https://gitea.amass.fun/amass/ZLMediaKit.git \
&& cd /root/ZLMediaKit \
&& apt install -y libsrtp2-dev libusrsctp-dev \
&& cmake -G Ninja -B build -S . -DENABLE_OPENSSL=true -DENABLE_WEBRTC=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/opt/Libraries/ZLMediaKit" \
&& cmake --build build --target all \
&& cmake --install build \
&& echo 'export LD_LIBRARY_PATH=/opt/Libraries/ZLMediaKit/lib:$LD_LIBRARY_PATH' >> /etc/profile \
&& rm -fr /root/ZLMediaKit
2024-09-23 21:51:57 +08:00
ENV LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:/opt/Libraries/ZLMediaKit/lib
2024-06-25 21:16:53 +08:00
CMD ["service", "ssh", "start", "-D"]
2024-09-23 21:17:27 +08:00
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV TERM=xterm-256color
2024-06-25 21:16:53 +08:00
# docker build --progress=tty -f ubuntu2204.dockerfile -t frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04 .
2024-06-30 22:36:57 +08:00
# docker push frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04