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

Add dev container configuration #2

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Add dev container configuration #2

merged 2 commits into from
Nov 12, 2024

Conversation

dblnz
Copy link
Owner

@dblnz dblnz commented Nov 12, 2024

The following dev container configuration can be found in the .devcontainer directory.
It contains:

  • devcontainer.json a configuration file for the Dev container that puts everything toghether
  • create_env.sh script that is run on the host machine and creates a .devcontainer/.env file that contains the necessary group info for the container image build phase
  • Dockerfile.base config for a base container image that is pre-built by using the .github/workflows/CreateDevcontainerImage.yml action that is automatically triggered when a change is detected for Dockerfile.base or the workflow configuration.
  • Dockerfile config that uses the pre-build image as a base image, creates a group with the same GID of the device being passed to the docker container and adds the user to that group

Note: The reason why the environment file generation is needed is because in order to access the device (/dev/kvm) inside the container, the user needs to belong to the correct group, so the group is created at image build time.

* [chore] Add devcontainer config

Signed-off-by: Doru Blanzeanu <[email protected]>
Signed-off-by: Doru Blanzeanu <[email protected]>
@dblnz dblnz merged commit c34cfd1 into main Nov 12, 2024
1 of 21 checks passed
@dblnz dblnz deleted the add-dev-container branch November 12, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant