Skip to content

Commit b46d41e

Browse files
committed
add devcontainer
1 parent a2f9fe7 commit b46d41e

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM centos:7.9.2009
2+
3+
RUN yum -y install centos-release-scl \
4+
epel-release; \
5+
yum -y install devtoolset-7-gcc \
6+
devtoolset-7-gcc-c++ \
7+
python3 \
8+
make \
9+
libtool \
10+
openssl-devel \
11+
yum clean all; \
12+
rm -rf /var/cache/yum;
13+
14+
ENV PATH /opt/rh/devtoolset-7/root/bin/:$PATH
15+
RUN pip3 install --upgrade pip --no-cache-dir && pip3 install --no-cache-dir cmake==3.26.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
16+
17+
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo
18+
ENV PATH $CARGO_HOME/bin:$PATH
19+
RUN mkdir -p "$CARGO_HOME" && mkdir -p "$RUSTUP_HOME" && \
20+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.70.0 && \
21+
chmod -R a=rwX $CARGO_HOME
22+
RUN cargo install cxxbridge-cmd --version 1.0.18
23+
24+
WORKDIR /client-cpp

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "tikv/cpp-client",
3+
"dockerFile": "Dockerfile",
4+
"postAttachCommand": "bash",
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
"cschleiden.vscode-github-actions",
9+
"vadimcn.vscode-lldb"
10+
],
11+
"settings": {
12+
"editor.formatOnSave": true
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)