-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add a new .devcontainer #465
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #465 +/- ##
=======================================
Coverage 32.59% 32.59%
=======================================
Files 17 17
Lines 1617 1617
=======================================
Hits 527 527
Misses 1058 1058
Partials 32 32 ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,21 @@ | |||
{ | |||
"name": "copacetic", | |||
"image": "mcr.microsoft.com/devcontainers/base:jammy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we use ubuntu22.04
instead of jammy
] | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
|
||
sudo chown -R vscode:vscode . | ||
|
||
make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
@@ -0,0 +1 @@ | |||
* text=lf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
@@ -0,0 +1,5 @@ | |||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.48.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we install from apt or github release instead of curl | sudo sh
we can also add this to Makefile for a devcontainer specific target and have version as a variable so we don't have to update in multiple places in the future
@jpinz please make sure to sign your commits (see DCO failure) https://project-copacetic.github.io/copacetic/website/contributing#developer-certificate-of-origin-dco |
This pull request includes changes to the development environment configuration. The most important changes are the addition of a new development container configuration, a post-creation script for the development container, and a
.gitattributes
file to enforce line endings.Development container configuration:
.devcontainer/devcontainer.json
: A new development container configuration has been added. The container is named "copacetic" and is based on themcr.microsoft.com/devcontainers/base:jammy
image. It includes Docker-in-Docker and Go features, runs a post-creation script, sets the remote user to "vscode", and installs several VS Code extensions.Post-creation script:
.devcontainer/post-create.sh
: A post-creation script for the development container has been added. It installs the Trivy security scanner, changes the ownership of all files in the current directory to "vscode", and runs themake
command.Line endings enforcement:
.gitattributes
: A new.gitattributes
file has been added to enforce LF line endings for all text files.