feat(devcontainer): add Dev Container configuration for reproducible … - #975
Open
Princess0407 wants to merge 1 commit into
Open
feat(devcontainer): add Dev Container configuration for reproducible …#975Princess0407 wants to merge 1 commit into
Princess0407 wants to merge 1 commit into
Conversation
…development Adds Dev Container configuration to provide a reproducible, one click development environment for urunc. Files added: - .devcontainer/devcontainer.json - .devcontainer/Dockerfile - .devcontainer/post-create.sh The dev container supports 'make unittest' and 'make lint' out of the box.KVM passthrough is enabled for local VS Code + Docker environments.GitHub Codespaces supports unit tests and linting (e2e tests requiring KVM are not available in Codespaces due to lack of nested virtualization). Signed-off-by: Priyanka Tiwari <priyankatiwari140419@gmail.com>
✅ Deploy Preview for urunc canceled.
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Right now, getting started with
uruncrequires manually installing Docker, QEMU, containerd, CNI plugins, and Go across different package managers and manual steps. This is documented in the installation guide, but it's a significant barrier for new contributors and LFX mentees who just want to runmake unittestormake lint.A Dev Container automates that same setup into a reproducible, version controlled environment.
What's added
.devcontainer/devcontainer.json: configures the container with Docker in Docker, KVM passthrough (--device=/dev/kvm), and VS Code extensions for Go development.devcontainer/Dockerfile: Ubuntu 22.04 base image with Go, QEMU, containerd, CNI plugins, and build tools pre installed.devcontainer/post-create.sh: runs after container creation to set up git safe directory and download Go modulesHow to use it
Local VS Code + Docker (recommended for full e2e testing):
GitHub Codespaces:
make unittest,make lint, and build workflowsVerification
Tested locally with
docker buildanddocker run:Test results
make unittestwas run inside the dev container. The test suite passes overall with 3 pre existing failures that are unrelated to this PR:TestCopyFile/copy_file_target_dir_creation_failedmkdirto fail with permission denied, but root can create any directoryTestCopyFile/copy_file_target_file_creation_failedTestMoveFile/move_file_target_file_creation_failedThese failures occur whenever tests run as
root(which the dev container does) and are not introduced by this PR. They are existing issues inpkg/unikontainers/utils_test.go.Inside container:
Related
Fixes #953