Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jpinz
Copy link

@jpinz jpinz commented Jan 8, 2024

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 the mcr.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 the make command.

Line endings enforcement:

  • .gitattributes: A new .gitattributes file has been added to enforce LF line endings for all text files.

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b91c45d) 32.59% compared to head (980fd49) 32.59%.

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.
📢 Have feedback on the report? Share it here.

@@ -0,0 +1,21 @@
{
"name": "copacetic",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
Copy link
Member

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

]
}
}
}
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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

@sozercan
Copy link
Member

sozercan commented Jan 8, 2024

@jpinz please make sure to sign your commits (see DCO failure) https://project-copacetic.github.io/copacetic/website/contributing#developer-certificate-of-origin-dco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

None yet

2 participants