Skip to content

Commit

Permalink
developer: dev container for development
Browse files Browse the repository at this point in the history
devcontainer has all the necessary libaries installed to run test
and build greenboot.

Signedff-by: Sayan Paul <[email protected]>
  • Loading branch information
say-paul committed Apr 16, 2024
1 parent c517c50 commit 3a09a4b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM fedora:latest

RUN bash -c "$(curl -fsSL "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/script-library/common-redhat.sh")" -- "true" "vscode" "1000" "1000" "true"

RUN dnf install -y \
sudo git cargo rust rust-src git-core clippy rustfmt \
rust-packaging rpmdevtools rpmlint \
&& dnf clean all

USER vscode
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "greenboot-rs",
"build": {
"dockerfile": "Dockerfile"
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
"settings": {
"rust-analyzer.checkOnSave.command": "clippy"
},
"extensions": [
"mutantdino.resourcemonitor",
"matklad.rust-analyzer",
"serayuzgur.crates"
],
"hostRequirements": {
"memory": "4gb"
},
"remoteUser": "vscode",
"updateContentCommand": [
"cargo",
"build"
],
"waitFor": "onCreateCommand"
}

0 comments on commit 3a09a4b

Please sign in to comment.