Skip to content

Commit 7e0919d

Browse files
author
bingtao.yin
committed
update ide files
1 parent 44f2cd9 commit 7e0919d

File tree

7 files changed

+119
-1
lines changed

7 files changed

+119
-1
lines changed

.clangd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,22 @@ If:
2323

2424
CompileFlags:
2525
CompilationDatabase: be/ut_build_ASAN/
26+
27+
---
28+
29+
If:
30+
PathMatch: be/.*
31+
32+
CompileFlags:
33+
CompilationDatabase: be/build_Debug
34+
35+
---
36+
37+
If:
38+
PathMatch: cloud/.*
39+
40+
CompileFlags:
41+
CompilationDatabase: cloud/build_Debug
42+
Add:
43+
- -isystem
44+
- /opt/transwarp/doris/gensrc/build

.devcontainer/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ BUILD_PROC=80
55
DEV_USERNAME=dev
66
USER_UID=1004
77
USER_GID=1004
8+
LOCAL_CCACHE=/mnt/nvme1n1/data/bingtao.yin/ccache_files
9+
LOCAL_MVN_REPO=/mnt/nvme1n1/data/bingtao.yin/maven

.devcontainer/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ RUN \
2626
sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
2727
echo 'Acquire::ForceIPv4 "true";' >> /etc/apt/apt.conf.d/1000-force-ipv4-transport && \
2828
echo 'Acquire::Retries "100";' >> /etc/apt/apt.conf.d/80-retries && \
29+
echo 'Acquire::http::Proxy "${HTTP_PROXY}";' >> /etc/apt/apt.conf.d/99-proxy && \
30+
echo 'Acquire::https::Proxy "${HTTPS_PROXY}";' >> /etc/apt/apt.conf.d/99-proxy && \
2931
apt-get update -y && \
3032
# basics
3133
PKGS="software-properties-common" && \
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
output
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
FROM ubuntu:22.04
2+
3+
ARG OUTPUT_DIR
4+
ARG HTTP_PROXY
5+
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
8+
ENV PATH=${JAVA_HOME}/bin:${PATH}
9+
ENV TZ=Asia/Shanghai
10+
ENV GO_VERSION=1.25.1
11+
12+
RUN \
13+
# prepare apt
14+
sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
15+
sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
16+
echo 'Acquire::ForceIPv4 "true";' >> /etc/apt/apt.conf.d/1000-force-ipv4-transport && \
17+
echo 'Acquire::Retries "100";' >> /etc/apt/apt.conf.d/80-retries && \
18+
apt-get update -y && \
19+
# basics
20+
PKGS="software-properties-common" && \
21+
PKGS="${PKGS} openjdk-17-jdk" && \
22+
PKGS="${PKGS} vim sudo locales curl unzip wget iputils-ping iproute2 tzdata tree" && \
23+
# from doris
24+
PKGS="${PKGS} patchelf gdb binutils binutils-common mysql-client" \
25+
PKGS="${PKGS} curl wget less vim htop iproute2 numactl jq iotop sysstat" \
26+
PKGS="${PKGS} tcpdump iputils-ping dnsutils strace lsof blktrace tzdata" \
27+
PKGS="${PKGS} bpfcc-tools linux-headers-realtime linux-tools-realtime silversearcher-ag" \
28+
PKGS="${PKGS} net-tools ca-certificates openssl" && \
29+
apt-get install -y ${PKGS} && \
30+
apt-get autoclean && \
31+
rm -rf /var/lib/apt/lists/* && \
32+
locale-gen en_US.UTF-8 && \
33+
echo ${TZ} > /etc/timezone && \
34+
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
35+
dpkg-reconfigure tzdata
36+
37+
ENV LC_ALL="en_US.UTF-8"
38+
ENV LANG="en_US.UTF-8"
39+
40+
# pprof
41+
RUN \
42+
# proxy for wget
43+
echo "use_proxy = on" >> /root/.wgetrc && \
44+
echo "http_proxy = ${HTTP_PROXY}" >> /root/.wgetrc && \
45+
echo "https_proxy = ${HTTP_PROXY}" >> /root/.wgetrc && \
46+
wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
47+
rm -rf /usr/local/go && \
48+
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz && \
49+
rm go${GO_VERSION}.linux-amd64.tar.gz && \
50+
echo "" > /root/.wgetrc
51+
52+
ENV PATH="/usr/local/go/bin:${PATH}"
53+
ENV GOPATH=/go
54+
ENV PATH="${GOPATH}/bin:${PATH}"
55+
56+
RUN GOPROXY=https://goproxy.cn,direct http_proxy=${HTTP_PROXY} http_proxy=${HTTP_PROXY} go install github.com/google/pprof@latest
57+
58+
COPY ${OUTPUT_DIR} /opt/doris
59+
60+
WORKDIR /opt/doris
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
common_build_args="
4+
--network=host
5+
--build-arg HTTP_PROXY=http://192.168.2.1:28080
6+
"
7+
function image_suffix {
8+
commit=$(git rev-parse --short HEAD)
9+
current_date=$(date +%Y%m%d)
10+
11+
echo "${current_date}_${commit}"
12+
13+
unset commit
14+
unset current_date
15+
}
16+
17+
function build_runtime {
18+
tag=$(image_suffix)
19+
20+
build_args="
21+
${common_build_args}
22+
--build-arg OUTPUT_DIR=output
23+
"
24+
25+
docker build \
26+
${build_args} \
27+
-t doris_runtime:${tag} \
28+
-f Dockerfile \
29+
.
30+
31+
unset tag
32+
unset build_args
33+
}

.devcontainer/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"--query-driver=/usr/bin/gcc",
3434
"--suggest-missing-includes",
3535
"--cross-file-rename",
36-
"--compile-commands-dir=/opt/transwarp/doris/be/build_Debug",
36+
// "--compile-commands-dir=/opt/transwarp/doris/be/build_Debug",
3737
"--completion-style=detailed",
3838
"-j=80",
3939
"--all-scopes-completion",
@@ -53,4 +53,5 @@
5353
"C_Cpp.default.cppStandard": "c++20",
5454
"C_Cpp.default.cStandard": "c17",
5555
"C_Cpp.default.browse.databaseFilename": "${workspaceFolder}/.vscode/.browse.c_cpp.db",
56+
"http.proxy": "http://192.168.2.1:28080",
5657
}

0 commit comments

Comments
 (0)