Skip to content

Commit 076b379

Browse files
committed
chore: add devcontainer configs
1 parent 775af2d commit 076b379

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

.devcontainer/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM datafuselabs/build-tool:dev
2+
3+
ENV TERM xterm-256color
4+
5+
RUN apt-get update && apt-get install -y git ripgrep && \
6+
curl -sSo /tmp/install.sh https://starship.rs/install.sh && \
7+
chmod +x /tmp/install.sh && \
8+
/tmp/install.sh --yes && \
9+
printf 'eval "$(starship init bash)"' >> /etc/bash.bashrc && \
10+
curl -sSLo /tmp/lsd.deb https://github.com/Peltoche/lsd/releases/download/0.21.0/lsd_0.21.0_amd64.deb && \
11+
dpkg -i /tmp/lsd.deb && \
12+
rm -rf /tmp/* /var/lib/apt/lists/*
13+
14+
RUN mkdir /home/builder && chown -R builder /home/builder && \
15+
usermod --shell /bin/bash builder
16+
17+
USER builder

.devcontainer/devcontainer.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Databend",
3+
"extensions": [
4+
"cschleiden.vscode-github-actions",
5+
"rust-lang.rust-analyzer",
6+
"serayuzgur.crates",
7+
"vadimcn.vscode-lldb"
8+
],
9+
"mounts": [
10+
"source=${localEnv:HOME}/.cargo/registry,target=/opt/rust/cargo/registry,type=bind,consistency=cached",
11+
"source=${localEnv:HOME}/.cargo/git,target=/opt/rust/cargo/git,type=bind,consistency=cached",
12+
"source=${localEnv:HOME},target=/home/builder,type=bind,consistency=cached"
13+
],
14+
"dockerFile": "Dockerfile",
15+
"remoteUser": "builder",
16+
"updateRemoteUserUID": true,
17+
"postCreateCommand": "sudo chown -R builder /opt/rust",
18+
"settings": {
19+
"editor.formatOnSave": true,
20+
"files.exclude": {
21+
"**/LICENSE": true
22+
}
23+
}
24+
}

.github/workflows/developing.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ on:
88
- 'docs/**'
99
- 'website/**'
1010
- '**.md'
11+
- 'scripts/setup/**'
12+
- '.devcontainer/**'
1113
pull_request:
1214
paths-ignore:
1315
- 'docs/**'
1416
- 'website/**'
1517
- '**.md'
1618
- 'scripts/setup/**'
19+
- '.devcontainer/**'
1720

1821
concurrency:
1922
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}

.licenserc.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ header:
1212
- "tools"
1313
# Ignore hidden files
1414
- ".cargo"
15+
- ".devcontainer"
1516
- ".github"
1617
- ".dockerignore"
1718
- ".gitignore"

0 commit comments

Comments
 (0)