Skip to content

Commit eca8ab3

Browse files
committed
add devcontainer configuration
1 parent 3f17bfd commit eca8ab3

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/rust/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
4+
ARG VARIANT="buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional packages.
8+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
&& apt-get -y install --no-install-recommends libssl-dev pkg-config lintian \
10+
&& apt-get -y install --no-install-recommends python3 pip rpm python3-rpm \
11+
&& pip install --upgrade rpmlint \
12+
&& rpmlint -V

.devcontainer/devcontainer.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/rust
3+
{
4+
"name": "Rust",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
9+
// Use bullseye when on local on arm64/Apple Silicon.
10+
"VARIANT": "bullseye"
11+
}
12+
},
13+
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
14+
15+
// Configure tool-specific properties.
16+
"customizations": {
17+
// Configure properties specific to VS Code.
18+
"vscode": {
19+
// Set *default* container specific settings.json values on container create.
20+
"settings": {
21+
"lldb.executable": "/usr/bin/lldb",
22+
// VS Code don't watch files under ./target
23+
"files.watcherExclude": {
24+
"**/target/**": true
25+
},
26+
"rust-analyzer.checkOnSave.command": "clippy"
27+
},
28+
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"vadimcn.vscode-lldb",
32+
"mutantdino.resourcemonitor",
33+
"rust-lang.rust-analyzer",
34+
"tamasfe.even-better-toml",
35+
"serayuzgur.crates",
36+
"mads-hartmann.bash-ide-vscode",
37+
"aaron-bond.better-comments",
38+
"jeff-hykin.better-shellscript-syntax",
39+
"ms-azuretools.vscode-docker",
40+
"IronGeek.vscode-env",
41+
"mhutchie.git-graph",
42+
"cschleiden.vscode-github-actions",
43+
"oderwat.indent-rainbow",
44+
"DavidAnson.vscode-markdownlint",
45+
"ms-python.vscode-pylance",
46+
"ms-python.python",
47+
"foxundermoon.shell-format"
48+
]
49+
}
50+
},
51+
52+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
53+
// "forwardPorts": [],
54+
55+
// Use 'postCreateCommand' to run commands after the container is created.
56+
// "postCreateCommand": "rustc --version",
57+
58+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
59+
"remoteUser": "vscode",
60+
"features": {
61+
"docker-from-docker": "20.10",
62+
"git": "os-provided",
63+
"github-cli": "latest",
64+
"python": "os-provided"
65+
}
66+
}

.github/workflows/cicd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI/CD
33
on:
44
push:
55
paths-ignore:
6+
- ".devcontainer"
67
- ".github/workflows/pkg.yml"
78
- ".github/workflows/update-packagers.yml"
89
- ".github/dependabot.yml"
@@ -12,6 +13,7 @@ on:
1213
- "test.sh"
1314
pull_request:
1415
paths-ignore:
16+
- ".devcontainer"
1517
- ".github/workflows/pkg.yml"
1618
- ".github/workflows/update-packagers.yml"
1719
- ".github/dependabot.yml"

0 commit comments

Comments
 (0)