add ubuntu20.04 develop image.
This commit is contained in:
parent
6e555579e2
commit
d850a7abbc
59
.drone.yml
59
.drone.yml
@ -2,23 +2,42 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
name: docker-build
|
name: docker-build
|
||||||
steps:
|
steps:
|
||||||
- name: deploy-mkdocs
|
- name: deploy-mkdocs
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.cn-shenzhen.aliyuncs.com
|
registry: registry.cn-shenzhen.aliyuncs.com
|
||||||
repo: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop
|
repo: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop
|
||||||
tags: mkdocs
|
tags: mkdocs
|
||||||
dockerfile: mkdocs.dockerfile
|
dockerfile: mkdocs.dockerfile
|
||||||
username: 168062547@qq.com
|
username: 168062547@qq.com
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
- name: deploy-ubuntu2004
|
- name: deploy-ubuntu2004
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.cn-shenzhen.aliyuncs.com
|
registry: registry.cn-shenzhen.aliyuncs.com
|
||||||
repo: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop
|
repo: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop
|
||||||
tags: ubuntu2004
|
tags: ubuntu2004
|
||||||
dockerfile: ubuntu.dockerfile
|
dockerfile: ubuntu2004.dockerfile
|
||||||
username: 168062547@qq.com
|
username: 168062547@qq.com
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
- name: deploy-raspberrypi
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
registry: registry.cn-shenzhen.aliyuncs.com
|
||||||
|
repo: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop
|
||||||
|
tags: raspberrypi
|
||||||
|
dockerfile: raspberrypi.dockerfile
|
||||||
|
username: 168062547@qq.com
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
- name: notify
|
||||||
|
image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:20.04
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- success
|
||||||
|
commands:
|
||||||
|
- >-
|
||||||
|
cat resources/notify.tpl | envsubst | jq -sR . | xargs -0 -I {} curl -H "Content-Type: application/json" -X POST -d '{"type":"text","msg":{} }' https://amass.fun/notify
|
||||||
|
@ -17,10 +17,10 @@ RUN --mount=type=ssh \
|
|||||||
rsync -avz --ignore-errors pi@$PI_ADDRESS:/lib sysroot && \
|
rsync -avz --ignore-errors pi@$PI_ADDRESS:/lib sysroot && \
|
||||||
rsync -avz --ignore-errors pi@$PI_ADDRESS:/usr/include sysroot/usr && \
|
rsync -avz --ignore-errors pi@$PI_ADDRESS:/usr/include sysroot/usr && \
|
||||||
rsync -avz --ignore-errors --exclude lib/chromium-browser --exclude lib/libreoffice --exclude lib/scratch3 \
|
rsync -avz --ignore-errors --exclude lib/chromium-browser --exclude lib/libreoffice --exclude lib/scratch3 \
|
||||||
--exclude lib/debug --exclude lib/arm-linux-gnueabihf/dri \
|
--exclude lib/debug --exclude lib/arm-linux-gnueabihf/dri \
|
||||||
--exclude lib/kernel --exclude lib/firmware --exclude lib/modules \
|
--exclude lib/kernel --exclude lib/firmware --exclude lib/modules \
|
||||||
--exclude lib/ruby --exclude lib/pypy --exclude lib/python2.7 --exclude lib/python3 --exclude lib/python3.9 \
|
--exclude lib/ruby --exclude lib/pypy --exclude lib/python2.7 --exclude lib/python3 --exclude lib/python3.9 \
|
||||||
pi@$PI_ADDRESS:/usr/lib sysroot/usr ;exit 0
|
pi@$PI_ADDRESS:/usr/lib sysroot/usr ;exit 0
|
||||||
|
|
||||||
ADD resources/sysroot-relativelinks.py resources/raspberrypi.cmake /opt/RaspberryPi/
|
ADD resources/sysroot-relativelinks.py resources/raspberrypi.cmake /opt/RaspberryPi/
|
||||||
RUN ./sysroot-relativelinks.py sysroot
|
RUN ./sysroot-relativelinks.py sysroot
|
||||||
@ -94,4 +94,8 @@ RUN bash -c "sed -i -e 's/set_and_check(XLNT_INCLUDE_DIR \"include\")/# set_and_
|
|||||||
RUN rm -fr /home/temp
|
RUN rm -fr /home/temp
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
# eval $(ssh-agent) && ssh-add ~/.ssh/id_rsa
|
# eval $(ssh-agent) && ssh-add ~/.ssh/id_rsa
|
||||||
# docker build -f raspberrypi.dockerfile -t raspberrypi --build-arg PI_ADDRESS="192.168.1.2" --ssh default=$SSH_AUTH_SOCK .
|
# docker build -f raspberrypi.dockerfile -t develop:raspberrypi --build-arg PI_ADDRESS="192.168.1.2" --ssh default=$SSH_AUTH_SOCK .
|
||||||
|
# docker tag develop:raspberrypi registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:raspberrypi
|
||||||
|
# docker push registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:raspberrypi
|
||||||
|
|
||||||
|
|
||||||
|
6
resources/notify.tpl
Normal file
6
resources/notify.tpl
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
repo: $DRONE_REPO_NAME
|
||||||
|
status: $DRONE_BUILD_STATUS
|
||||||
|
commit: $DRONE_COMMIT
|
||||||
|
构建: $DRONE_BUILD_LINK
|
||||||
|
仓库: $DRONE_REPO_LINK
|
||||||
|
提交注释: $DRONE_COMMIT_MESSAGE
|
@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \
|
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 && \
|
sed -i "s@http://.*security.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y wget git cmake ninja-build pkg-config \
|
apt-get install -y wget curl jq gettext git cmake ninja-build pkg-config \
|
||||||
libssl-dev libcurl4-openssl-dev libffmpeg-ocaml-dev libfreetype-dev libalsa-ocaml-dev \
|
libssl-dev libcurl4-openssl-dev libffmpeg-ocaml-dev libfreetype-dev libalsa-ocaml-dev \
|
||||||
liblzma-dev libx264-dev gcc g++
|
liblzma-dev libx264-dev gcc g++
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_
|
|||||||
RUN tar xvf boost_1_81_0.tar.gz && \
|
RUN tar xvf boost_1_81_0.tar.gz && \
|
||||||
tar xvf zeromq-4.3.4.tar.gz && \
|
tar xvf zeromq-4.3.4.tar.gz && \
|
||||||
tar xvf xlnt-1.5.0.tar.gz
|
tar xvf xlnt-1.5.0.tar.gz
|
||||||
|
|
||||||
WORKDIR /home/temp/boost_1_81_0
|
WORKDIR /home/temp/boost_1_81_0
|
||||||
RUN ./bootstrap.sh --prefix=/opt/Libraries/boost_1_81_0
|
RUN ./bootstrap.sh --prefix=/opt/Libraries/boost_1_81_0
|
||||||
RUN ./b2 install -q --prefix=/opt/Libraries/boost_1_81_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC
|
RUN ./b2 install -q --prefix=/opt/Libraries/boost_1_81_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC
|
||||||
@ -60,3 +60,5 @@ RUN rm -fr /home/temp
|
|||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
# docker build -f ubuntu.dockerfile -t develop:22.04 .
|
# docker build -f ubuntu.dockerfile -t develop:22.04 .
|
||||||
|
# docker tag develop:22.04 registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:22.04
|
||||||
|
# docker push registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:[镜像版本号]
|
65
ubuntu2004.dockerfile
Normal file
65
ubuntu2004.dockerfile
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
LABEL maintainer 168062547@qq.com
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y software-properties-common curl wget jq gettext git ninja-build pkg-config \
|
||||||
|
libssl-dev libcurl4-openssl-dev libffmpeg-ocaml-dev libfreetype-dev libalsa-ocaml-dev \
|
||||||
|
liblzma-dev libx264-dev
|
||||||
|
|
||||||
|
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
|
||||||
|
apt-get install -y locate gcc-11 g++-11 && \
|
||||||
|
updatedb && ldconfig && \
|
||||||
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 && \
|
||||||
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 110
|
||||||
|
|
||||||
|
WORKDIR /home/temp
|
||||||
|
RUN wget https://github.com/Kitware/CMake/releases/download/v3.25.0/cmake-3.25.0-linux-x86_64.tar.gz && \
|
||||||
|
wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz && \
|
||||||
|
wget https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz && \
|
||||||
|
wget https://github.com/tfussell/xlnt/archive/refs/tags/v1.5.0.tar.gz -O xlnt-1.5.0.tar.gz
|
||||||
|
|
||||||
|
RUN tar xvf cmake-3.25.0-linux-x86_64.tar.gz -C /opt && \
|
||||||
|
tar xvf boost_1_81_0.tar.gz && \
|
||||||
|
tar xvf zeromq-4.3.4.tar.gz && \
|
||||||
|
tar xvf xlnt-1.5.0.tar.gz
|
||||||
|
ENV PATH="${PATH}:/opt/cmake-3.25.0-linux-x86_64/bin"
|
||||||
|
|
||||||
|
WORKDIR /home/temp/boost_1_81_0
|
||||||
|
RUN ./bootstrap.sh --prefix=/opt/Libraries/boost_1_81_0
|
||||||
|
RUN ./b2 install -q --prefix=/opt/Libraries/boost_1_81_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC
|
||||||
|
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/Libraries/boost_1_81_0/lib"
|
||||||
|
|
||||||
|
WORKDIR /home/temp/zeromq-4.3.4/build
|
||||||
|
RUN cmake \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/zeromq-4.3.4_debug \
|
||||||
|
..
|
||||||
|
RUN ninja install
|
||||||
|
RUN rm -fr ./*
|
||||||
|
RUN cmake \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/zeromq-4.3.4_release \
|
||||||
|
..
|
||||||
|
RUN ninja install
|
||||||
|
|
||||||
|
WORKDIR /home/temp/xlnt-1.5.0/build
|
||||||
|
RUN sed -i '1s/^/#include <limits>\n/' ../source/detail/number_format/number_formatter.cpp && \
|
||||||
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/xlnt-1.5.0_debug .. && \
|
||||||
|
ninja install && rm -fr ./* && \
|
||||||
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/xlnt-1.5.0_release .. && \
|
||||||
|
ninja install && \
|
||||||
|
bash -c "sed -i -e 's/set_and_check(XLNT_INCLUDE_DIR \"include\")/# set_and_check(XLNT_INCLUDE_DIR \"include\")/g' /opt/Libraries/xlnt-1.5.0_debug/lib/cmake/xlnt/XlntConfig.cmake &&\
|
||||||
|
sed -i -e 's/set_and_check(XLNT_INCLUDE_DIR \"include\")/# set_and_check(XLNT_INCLUDE_DIR \"include\")/g' /opt/Libraries/xlnt-1.5.0_release/lib/cmake/xlnt/XlntConfig.cmake"
|
||||||
|
WORKDIR /
|
||||||
|
RUN rm -fr /home/temp
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
|
# docker build -f ubuntu2004.dockerfile -t develop:20.04 .
|
||||||
|
# docker login --username=168062547@qq.com registry.cn-shenzhen.aliyuncs.com
|
||||||
|
# docker tag develop:20.04 registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:20.04
|
||||||
|
# docker push registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop:20.04
|
Loading…
Reference in New Issue
Block a user