Skip to content

Commit

Permalink
Split ubuntu20.04 Dockerfile (#91)
Browse files Browse the repository at this point in the history
* fix-dockerfile

* add ubuntu20.04

* remove comment

* remove apt mirror
  • Loading branch information
Shinji-IkariG authored Nov 20, 2024
1 parent 3790240 commit e917ab1
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
# - {"name": "centos8", "file": "centos8"}
# - {"name": "ubuntu1604", "version": "xenial", "file": "ubuntu"}
# - {"name": "ubuntu1804", "version": "bionic", "file": "ubuntu"}
- {"name": "ubuntu2004", "version": "focal", "file": "ubuntu"}
- {"name": "ubuntu2404", "version": "noble", "file": "ubuntu2404"}
- {"name": "ubuntu2004", "version": "20.04", "file": "ubuntu2004"}
- {"name": "ubuntu2404", "version": "24.04", "file": "ubuntu2404"}
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
Expand Down
77 changes: 77 additions & 0 deletions Dockerfile.ubuntu2004
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
FROM ubuntu:20.04

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 update && apt 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-core \
m4 \
make \
ncurses-dev \
ninja-build \
openssh-client \
python3-dev \
python3-pip \
sudo \
tzdata \
unzip \
wget \
xz-utils \
lcov \
build-essential \
clang \
clang-format \
clang-tidy \
clang-tools \
vim \
ccache \
git \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /root

ENV CCACHE_CPP2=1

SHELL ["/bin/bash", "-c"]

# Install cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-$(uname -m).sh \
&& chmod +x cmake-3.20.0-linux-$(uname -m).sh \
&& ./cmake-3.20.0-linux-$(uname -m).sh --skip-license --prefix=/usr/local \
&& rm cmake-3.20.0-linux-$(uname -m).sh

# 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/
10 changes: 7 additions & 3 deletions Dockerfile.ubuntu2404
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:noble
FROM ubuntu:24.04

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 \
RUN apt update && apt install -y --no-install-recommends \
autoconf \
ca-certificates \
curl \
Expand Down Expand Up @@ -37,6 +37,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git \
cmake \
build-essential \
clang-17 \
clang-format-17 \
clang-tidy-17 \
clang-tools-17 \
vim \
ccache \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -50,7 +54,7 @@ RUN git clone https://github.com/vesoft-inc/nebula-third-party.git \
&& cd .. && rm -rf nebula-third-party

# fastcov
RUN pip3 install --no-cache-dir fastcov
RUN pipx install fastcov && pipx ensurepath

# Install ossutil
RUN curl https://gosspublic.alicdn.com/ossutil/install.sh | bash
Expand Down

0 comments on commit e917ab1

Please sign in to comment.