-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scripts/Dockerfile_build_environment_ubuntu_2004
- Loading branch information
Showing
6 changed files
with
118 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
FROM ubuntu:focal | ||
|
||
RUN apt update && apt install -y ca-certificates \ | ||
&& sed -i 's@//.*archive.ubuntu.com@//mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list \ | ||
&& apt update | ||
|
||
# Install git wget unzip software-properties-common | ||
RUN DEBIAN_FRONTEND=noninteractive apt install -y git wget unzip software-properties-common | ||
|
||
# Install cmake-3.28.1 | ||
RUN wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz \ | ||
&& tar zxvf cmake-3.28.1-linux-x86_64.tar.gz \ | ||
&& cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin \ | ||
&& cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share \ | ||
&& rm -rf cmake-3.28.1-linux-x86_64 | ||
|
||
# Install ninja-1.11.1 | ||
RUN wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \ | ||
&& unzip ninja-linux.zip && cp ninja /usr/local/bin && rm ninja | ||
|
||
# Add apt source for llvm-17 | ||
RUN echo 'deb https://mirrors.tuna.tsinghua.edu.cn/llvm-apt/focal/ llvm-toolchain-focal-17 main' > /etc/apt/sources.list.d/llvm17.list \ | ||
&& wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | ||
|
||
# Add apt source for g++-13 gcc-13 libstdc++-13-dev libboost1.81-dev liburing-dev | ||
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test \ | ||
&& add-apt-repository -y ppa:mhier/libboost-latest \ | ||
&& add-apt-repository -y ppa:rhansen/qemu | ||
|
||
# Install g++-13 clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev | ||
RUN apt update \ | ||
&& apt install -y g++-13 clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev | ||
|
||
# Create a symbolic link for clang-scan-deps-17 | ||
RUN ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps | ||
|
||
ENV CC=/usr/bin/clang-17 | ||
ENV CXX=/usr/bin/clang++-17 | ||
|
||
# Install curl clang-tidy-17 clang-format-17 vim emacs-nox bison thrift-compiler postgresql-client python3-pip python3-venv tree rpm libgflags-dev | ||
RUN apt install -y curl clang-tidy-17 clang-format-17 vim emacs-nox bison thrift-compiler postgresql-client python3-pip python3-venv tree rpm libgflags-dev | ||
RUN ln -s /usr/bin/clang-format-17 /usr/bin/clang-format \ | ||
&& ln -s /usr/bin/clang-tidy-17 /usr/bin/clang-tidy \ | ||
&& ln -s /usr/bin/llvm-symbolizer-17 /usr/bin/llvm-symbolizer | ||
|
||
# rust, refers to https://rsproxy.cn/ | ||
ENV RUSTUP_DIST_SERVER="https://rsproxy.cn" | ||
ENV RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" | ||
ENV PATH=/root/.cargo/bin:$PATH | ||
RUN wget -O rustup-init.sh https://rsproxy.cn/rustup-init.sh && sh rustup-init.sh -y | ||
RUN mkdir -vp $HOME/.cargo && echo "[source.crates-io]" >> $HOME/.cargo/config \ | ||
&& echo "replace-with = 'rsproxy-sparse'" >> $HOME/.cargo/config \ | ||
&& echo "[source.rsproxy]" >> $HOME/.cargo/config \ | ||
&& echo "registry = 'https://rsproxy.cn/index/'" >> $HOME/.cargo/config \ | ||
&& echo "[source.rsproxy-sparse]" >> $HOME/.cargo/config \ | ||
&& echo "registry = 'sparse+https://rsproxy.cn/index/'" >> $HOME/.cargo/config \ | ||
&& echo "[registries.rsproxy]" >> $HOME/.cargo/config \ | ||
&& echo "index = 'https://rsproxy.cn/crates.io-index'" >> $HOME/.cargo/config \ | ||
&& echo "[net]" >> $HOME/.cargo/config \ | ||
&& echo "git-fetch-with-cli = true" >> $HOME/.cargo/config | ||
|
||
# sqllogictest | ||
RUN cargo install sqllogictest-bin | ||
|
||
# Create a python virtual environment. Set PATH so that the shell activate this virtual environment automatically when entering a container from this image. | ||
RUN python3 -m venv /usr/local/venv | ||
ENV PATH="/usr/local/venv/bin:$PATH" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters