add ubuntu2204 dockerfile.
All checks were successful
Deploy Docker Images / Docusaurus build and Server deploy (push) Successful in 6s

This commit is contained in:
amass 2024-06-25 21:16:53 +08:00
parent f9443979b7
commit 1f948be0bc
2 changed files with 59 additions and 4 deletions

51
ubuntu2204.dockerfile Normal file
View File

@ -0,0 +1,51 @@
FROM ubuntu:22.04
LABEL maintainer 168062547@qq.com
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 \
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev \
&& 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
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=/opt/Libraries/boost_1_85_0/lib:$LD_LIBRARY_PATH
CMD ["service", "ssh", "start", "-D"]
ENV LANG C.UTF-8
# docker build --progress=tty -f ubuntu2204.dockerfile -t frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04 .
# docker push frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04

View File

@ -7,7 +7,7 @@ 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 \
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev \
&& 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 \
@ -18,6 +18,10 @@ RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.l
&& 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 \
@ -38,10 +42,10 @@ RUN cd /root \
&& ./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"
ENV LD_LIBRARY_PATH=/opt/Libraries/boost_1_85_0/lib:$LD_LIBRARY_PATH
ENV LANG C.UTF-8
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 build --progress=tty -f ubuntu2404.dockerfile -t frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04 .
# docker push 192.168.2.3:5000/ubuntu_dev:24.04