2024-11-01 10:03:07 +08:00
|
|
|
FROM ubuntu:24.04
|
|
|
|
LABEL maintainer="amass <168062547@qq.com>"
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2024-11-17 19:02:36 +08:00
|
|
|
ENV CODE_VERSION=4.95.2
|
2024-11-07 18:21:04 +08:00
|
|
|
ENV WT_VERSION=4.11.1
|
2024-11-01 10:03:07 +08:00
|
|
|
|
|
|
|
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++ gdb cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
|
2024-11-17 19:02:36 +08:00
|
|
|
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev zlib1g-dev gettext jq bzip2 unzip xz-utils zsh htop tini \
|
2024-11-01 10:03:07 +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 \
|
|
|
|
&& apt update \
|
2024-11-22 17:40:31 +08:00
|
|
|
&& apt install -y docker-ce-cli openresty \
|
2024-11-01 10:03:07 +08:00
|
|
|
&& apt clean \
|
|
|
|
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
RUN curl -fOL https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server_${CODE_VERSION}_amd64.deb \
|
|
|
|
&& dpkg -i code-server_${CODE_VERSION}_amd64.deb \
|
|
|
|
&& rm code-server_${CODE_VERSION}_amd64.deb
|
|
|
|
|
|
|
|
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
|
|
|
|
&& git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
|
|
|
|
&& git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \
|
|
|
|
&& git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k \
|
|
|
|
&& sed -i 's/ZSH_THEME=".*"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' /root/.zshrc \
|
|
|
|
&& sed -i 's/plugins=(.*)/plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)/' /root/.zshrc \
|
2024-11-22 17:40:31 +08:00
|
|
|
&& sed -i 's/^setopt share_history/# setopt share_history/' ~/.oh-my-zsh/lib/history.zsh \
|
|
|
|
&& echo 'setopt no_share_history' >> ~/.oh-my-zsh/lib/history.zsh \
|
|
|
|
&& echo 'if [ -f /etc/profile ]; then source /etc/profile; fi' >> /etc/zsh/zprofile \
|
2024-11-01 10:03:07 +08:00
|
|
|
&& chsh -s /bin/zsh root
|
|
|
|
|
|
|
|
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_ed25519/download -O /root/.ssh/authorized_keys \
|
|
|
|
&& chmod 600 /root/.ssh/authorized_keys && chown root:root /root/.ssh/authorized_keys
|
|
|
|
|
|
|
|
EXPOSE 1022
|
|
|
|
|
2024-11-22 17:40:31 +08:00
|
|
|
RUN cd /opt \
|
|
|
|
&& git clone --depth=1 https://github.com/emscripten-core/emsdk.git \
|
|
|
|
&& cd /opt/emsdk \
|
|
|
|
&& ./emsdk install latest \
|
|
|
|
&& ./emsdk activate latest \
|
|
|
|
&& echo 'export EMSDK_QUIET=1; source /opt/emsdk/emsdk_env.sh' >> /etc/profile
|
|
|
|
|
2024-11-01 10:03:07 +08:00
|
|
|
RUN cd /root \
|
|
|
|
&& apt update \
|
|
|
|
&& apt install -y libgl1-mesa-dev libfontconfig1-dev libfreetype-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev \
|
|
|
|
&& apt install -y libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavfilter-dev libavdevice-dev \
|
|
|
|
&& apt clean \
|
|
|
|
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
|
|
|
&& wget https://download.qt.io/official_releases/qt/6.8/6.8.0/single/qt-everywhere-src-6.8.0.tar.xz \
|
|
|
|
&& tar -xvf qt-everywhere-src-6.8.0.tar.xz \
|
|
|
|
&& cd ./qt-everywhere-src-6.8.0 \
|
|
|
|
&& ./configure -prefix /opt/Qt/6.8.0/gcc_64 -opensource -debug-and-release -confirm-license -nomake examples -nomake tests -skip qtwebengine -skip qtcoap -skip qtopcua \
|
|
|
|
&& cmake --build . --parallel \
|
|
|
|
&& ninja install \
|
|
|
|
&& rm -fr /root/qt-everywhere-src-6.8.0* \
|
|
|
|
&& echo 'export PATH=/opt/Qt/6.8.0/gcc_64/bin:$PATH' >> /etc/profile
|
|
|
|
|
|
|
|
RUN cd /root \
|
|
|
|
&& 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 \
|
|
|
|
&& rm -fr /root/boost_1_86_0* \
|
|
|
|
&& echo 'export LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:$LD_LIBRARY_PATH' >> /etc/profile
|
|
|
|
|
|
|
|
RUN cd /root \
|
|
|
|
&& wget https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.2/mbedtls-3.6.2.tar.bz2 \
|
|
|
|
&& tar xvf mbedtls-3.6.2.tar.bz2 \
|
|
|
|
&& cd /root/mbedtls-3.6.2 \
|
|
|
|
&& cmake -G Ninja -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/Libraries/mbedtls-3.6.2 \
|
|
|
|
&& cmake --build build --target all \
|
|
|
|
&& cmake --install build \
|
|
|
|
&& rm -fr /root/mbedtls-3.6.2*
|
|
|
|
|
|
|
|
RUN cd /root \
|
|
|
|
&& wget https://github.com/nanomsg/nng/archive/refs/tags/v1.9.0.tar.gz -O nng-1.9.0.tar.gz \
|
|
|
|
&& tar xvf nng-1.9.0.tar.gz \
|
|
|
|
&& cd /root/nng-1.9.0 \
|
|
|
|
&& sed -i 's/# PATH_SUFFIXES lib/PATH_SUFFIXES lib/' cmake/FindMbedTLS.cmake \
|
|
|
|
&& sed -i '/_MBEDTLS_LIBRARY/{n;n;n;n;s/#PATH_SUFFIXES lib/PATH_SUFFIXES lib/}' cmake/FindMbedTLS.cmake \
|
|
|
|
&& cmake -G Ninja -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/Libraries/nng-1.9.0 -DNNG_ELIDE_DEPRECATED=ON -DNNG_ENABLE_TLS=ON -DMBEDTLS_ROOT=/opt/Libraries/mbedtls-3.6.2 -D_MBEDTLS_V2_OR_NEWER=ON \
|
|
|
|
&& cmake --build build --target all \
|
|
|
|
&& cmake --install build \
|
|
|
|
&& rm -fr /root/nng-1.9.0*
|
|
|
|
|
|
|
|
RUN cd /root \
|
2024-11-07 18:21:04 +08:00
|
|
|
&& wget https://github.com/emweb/wt/archive/${WT_VERSION}.tar.gz -O wt-${WT_VERSION}.tar.gz \
|
|
|
|
&& tar xvf wt-${WT_VERSION}.tar.gz \
|
|
|
|
&& cd /root/wt-${WT_VERSION} \
|
|
|
|
&& cmake -G Ninja -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/Libraries/wt-${WT_VERSION} -DENABLE_QT4=OFF -DENABLE_QT5=OFF -DENABLE_QT6=OFF -DBOOST_ROOT=/opt/Libraries/boost_1_86_0 \
|
2024-11-01 10:03:07 +08:00
|
|
|
&& cmake --build build --target all \
|
|
|
|
&& cmake --install build \
|
2024-11-07 18:21:04 +08:00
|
|
|
&& rm -fr /root/wt-${WT_VERSION}*
|
2024-11-01 10:03:07 +08:00
|
|
|
|
2024-11-14 00:05:09 +08:00
|
|
|
RUN wget https://github.com/pouriyajamshidi/tcping/releases/download/v2.6.0/tcping_Linux.tar.gz -O /tmp/tcping_Linux.tar.gz \
|
|
|
|
&& tar -xzf /tmp/tcping_Linux.tar.gz -C /usr/bin \
|
|
|
|
&& rm /tmp/tcping_Linux.tar.gz
|
|
|
|
|
2024-11-01 10:03:07 +08:00
|
|
|
RUN cd /root \
|
|
|
|
&& git clone --depth=1 --recursive https://github.com/ZLMediaKit/ZLMediaKit.git \
|
|
|
|
&& cd /root/ZLMediaKit \
|
|
|
|
&& apt update \
|
|
|
|
&& apt install -y libsrtp2-dev libusrsctp-dev \
|
|
|
|
&& apt clean \
|
|
|
|
&& rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
|
|
|
&& 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
|
|
|
|
|
|
|
|
ENV LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:/opt/Libraries/ZLMediaKit/lib:/opt/Qt/6.8.0/gcc_64/lib
|
|
|
|
|
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
ENV TERM=xterm-256color
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
|
|
CMD ["bash", "-c", "service ssh start && code-server --bind-addr 0.0.0.0:8087"]
|
|
|
|
|
|
|
|
# docker build --progress=tty -f ubuntu2404.dockerfile -t registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04 .
|
|
|
|
# docker push registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04
|