Skip to content

Commit

Permalink
Add Ubuntu 24.04 Dockerfile (#90)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Shinji-IkariG authored Nov 19, 2024
1 parent 94abfb2 commit 3790240
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 48 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
16 changes: 3 additions & 13 deletions Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
14 changes: 3 additions & 11 deletions Dockerfile.centos8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
22 changes: 4 additions & 18 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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++
Expand All @@ -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
Expand All @@ -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
Expand Down
65 changes: 65 additions & 0 deletions Dockerfile.ubuntu2404
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit 3790240

Please sign in to comment.