From 37902404dc98d49c356f568b55eddebd2891134e Mon Sep 17 00:00:00 2001 From: George <58841610+Shinji-IkariG@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:06:22 +0800 Subject: [PATCH] Add Ubuntu 24.04 Dockerfile (#90) * Create Dockerfile.ubuntu2404 * Update docker.yml * Update Dockerfile.ubuntu * Update Dockerfile.ubuntu2404 * Update Dockerfile.ubuntu2404 * Update Dockerfile.centos7 * Update Dockerfile.centos8 * Update Dockerfile.centos7 * Update Dockerfile.centos8 * Update Dockerfile.ubuntu * Update docker.yml --- .github/workflows/docker.yml | 13 ++++---- Dockerfile.centos7 | 16 ++------- Dockerfile.centos8 | 14 ++------ Dockerfile.ubuntu | 22 +++--------- Dockerfile.ubuntu2404 | 65 ++++++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 48 deletions(-) create mode 100644 Dockerfile.ubuntu2404 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8260265..ed2b16d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,20 +27,21 @@ jobs: # - {"name": "ubuntu1604", "version": "xenial", "file": "ubuntu"} # - {"name": "ubuntu1804", "version": "bionic", "file": "ubuntu"} - {"name": "ubuntu2004", "version": "focal", "file": "ubuntu"} + - {"name": "ubuntu2404", "version": "noble", "file": "ubuntu2404"} steps: - - uses: actions/checkout@v3 - - uses: docker/login-action@v2 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 - - uses: docker/build-push-action@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile.${{ matrix.os.file }} platforms: linux/amd64,linux/arm64 - tags: vesoft/nebula-dev:${{ matrix.os.name }} + tags: vesoft/nebula-dev:${{ matrix.os.name }}-v5 push: true build-args: | VERSION=${{ matrix.os.version }} diff --git a/Dockerfile.centos7 b/Dockerfile.centos7 index 57144f2..2a04ca8 100644 --- a/Dockerfile.centos7 +++ b/Dockerfile.centos7 @@ -48,7 +48,7 @@ RUN sed -i 's/^mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-Base.repo && WORKDIR /root ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.3.0 +ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.5.0 ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_GCC_DIR}/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CCACHE_CPP2=1 ENV CC=${TOOLSET_GCC_DIR}/bin/gcc @@ -59,7 +59,7 @@ SHELL ["/bin/bash", "-c"] # Install gcc and llvm by nebula-gears RUN bash <(curl -s https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install) --prefix=/opt/vesoft/ \ - && /opt/vesoft/bin/install-gcc --version=9.3.0 \ + && /opt/vesoft/bin/install-gcc --version=9.5.0 \ && /opt/vesoft/bin/install-llvm --version=10.0.0 # Install cmake @@ -76,20 +76,10 @@ RUN wget -qO- https://github.com/git/git/archive/v2.25.0.tar.gz | tar zxf - -C . && make -j$(nproc) && make install \ && cd ../ && rm -rf git-2.25.0 -# Install nebula third-party 1.0 and 2.0 and 3.0 and 3.3 +# Install nebula third-party master RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \ && cd nebula-third-party \ && ./install-third-party.sh \ - && git checkout origin/release-3.3 \ - && ./install-third-party.sh \ - && git checkout origin/release-3.4-cloud \ - && ./install-third-party.sh \ - && git checkout origin/v3.0 \ - && ./install-third-party.sh \ - && git checkout origin/v2.0 \ - && ./install-third-party.sh \ - && git checkout origin/v1.0 \ - && ./install-third-party.sh \ && cd .. && rm -rf nebula-third-party # Install ccache diff --git a/Dockerfile.centos8 b/Dockerfile.centos8 index a52b320..d4dc70e 100644 --- a/Dockerfile.centos8 +++ b/Dockerfile.centos8 @@ -49,7 +49,7 @@ RUN yum update -y && yum install -y epel-release \ WORKDIR /root ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.3.0 +ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.5.0 ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_GCC_DIR}/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CCACHE_CPP2=1 ENV CC=${TOOLSET_GCC_DIR}/bin/gcc @@ -60,7 +60,7 @@ SHELL ["/bin/bash", "-c"] # Install gcc and llvm by nebula-gears RUN bash <(curl -s https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install) --prefix=/opt/vesoft/ \ - && /opt/vesoft/bin/install-gcc --version=9.3.0 \ + && /opt/vesoft/bin/install-gcc --version=9.5.0 \ && /opt/vesoft/bin/install-llvm --version=10.0.0 # Install cmake @@ -77,18 +77,10 @@ RUN wget -qO- https://github.com/git/git/archive/v2.25.0.tar.gz | tar zxf - -C . && make -j$(nproc) && make install \ && cd ../ && rm -rf git-2.25.0 -# Install nebula third-party 1.0 and 2.0 and 3.0 and 3.3 +# Install nebula third-party master RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \ && cd nebula-third-party \ && ./install-third-party.sh \ - && git checkout origin/release-3.3 \ - && ./install-third-party.sh \ - && git checkout origin/v3.0 \ - && ./install-third-party.sh \ - && git checkout origin/v2.0 \ - && ./install-third-party.sh \ - && git checkout origin/v1.0 \ - && ./install-third-party.sh \ && cd .. && rm -rf nebula-third-party # Install ccache diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 853dfdc..9284a5e 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -1,13 +1,9 @@ ARG VERSION=xenial -ARG DEBIAN_FRONTEND=noninteractive - FROM ubuntu:${VERSION} -ARG VERSION=xenial - +ARG DEBIAN_FRONTEND=noninteractive ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - ENV LANG=en_US.utf8 RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -46,7 +42,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /root ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.3.0 +ENV TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.5.0 ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_GCC_DIR}/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CC=${TOOLSET_GCC_DIR}/bin/gcc ENV CXX=${TOOLSET_GCC_DIR}/bin/g++ @@ -56,7 +52,7 @@ SHELL ["/bin/bash", "-c"] # Install gcc and llvm by nebula-gears RUN bash <(curl -s https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install) --prefix=/opt/vesoft/ \ - && /opt/vesoft/bin/install-gcc --version=9.3.0 \ + && /opt/vesoft/bin/install-gcc --version=9.5.0 \ && /opt/vesoft/bin/install-llvm --version=10.0.0 # Install cmake @@ -73,20 +69,10 @@ RUN wget -qO- https://github.com/git/git/archive/v2.25.0.tar.gz | tar zxf - -C . && make -j$(nproc) && make install \ && cd ../ && rm -rf git-2.25.0 -# Install nebula third-party 1.0 and 2.0 and 3.0 and 3.3 +# Install nebula third-party master RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \ && cd nebula-third-party \ && ./install-third-party.sh \ - && git checkout origin/release-3.3 \ - && ./install-third-party.sh \ - && git checkout origin/release-3.4-cloud \ - && ./install-third-party.sh \ - && git checkout origin/v3.0 \ - && ./install-third-party.sh \ - && git checkout origin/v2.0 \ - && ./install-third-party.sh \ - && git checkout origin/v1.0 \ - && ./install-third-party.sh \ && cd .. && rm -rf nebula-third-party # Install ccache diff --git a/Dockerfile.ubuntu2404 b/Dockerfile.ubuntu2404 new file mode 100644 index 0000000..32099f0 --- /dev/null +++ b/Dockerfile.ubuntu2404 @@ -0,0 +1,65 @@ +FROM ubuntu:noble + +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV LANG=en_US.utf8 +SHELL ["/bin/bash", "-c"] +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + autoconf \ + ca-certificates \ + curl \ + gettext \ + gnupg2 \ + libc-dev \ + libcurl4-gnutls-dev \ + libexpat1-dev \ + libldap2-dev \ + libreadline-dev \ + libssl-dev \ + libz-dev \ + locales-all \ + lsb-release \ + m4 \ + make \ + ncurses-dev \ + ninja-build \ + openssh-client \ + python3-dev \ + python3-pip \ + sudo \ + tzdata \ + unzip \ + wget \ + xz-utils \ + lcov \ + git \ + cmake \ + build-essential \ + vim \ + ccache \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /root + +# Install nebula third-party master +RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \ + && cd nebula-third-party \ + && ./install-third-party.sh \ + && cd .. && rm -rf nebula-third-party + +# fastcov +RUN pip3 install --no-cache-dir fastcov + +# Install ossutil +RUN curl https://gosspublic.alicdn.com/ossutil/install.sh | bash + +#Install minio client +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + curl -O https://dl.min.io/client/mc/release/linux-amd64/mc; \ + else \ + curl -O https://dl.min.io/client/mc/release/linux-arm64/mc; \ + fi \ + && chmod +x mc \ + && mv mc /usr/local/bin/