build(devcontainer): switch to .docker images and Linux-only devcontainer#3114
build(devcontainer): switch to .docker images and Linux-only devcontainer#3114
Conversation
Use komodo/komodo-wallet image; prebuild base images in initializeCommand; remove USB mount; macOS/WSL compatible. Delete obsolete .devcontainer/Dockerfile.
Build from .docker Dockerfile with USB mount; add GH workflow to build images on hosted runners.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughRemoves the local devcontainer Dockerfile, updates devcontainer.json to use a centralized Dockerfile and adds an initialize build step. Introduces a postCreate.sh to handle ownership and submodule setup. Tightens flutter pub get with lockfile enforcement. Adjusts .gitignore to match any build directory and configures sdk submodule to ignore dirty state. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as VS Code Dev Container
participant DK as Docker
participant IMG as Base Image (.docker/*)
participant C as Container
participant SH as .devcontainer/postCreate.sh
participant G as Git/Submodules
participant F as Flutter
Dev->>DK: docker build (initializeCommand)
DK->>IMG: Build komodo/android-sdk:35
DK-->>Dev: Image ready
Dev->>DK: Create & start container
DK-->>C: Container running
Dev->>C: Run postCreateCommand
C->>SH: Execute script
SH->>C: chown (best-effort)
SH->>G: submodule sync / update (recursive, checkout)
Dev->>C: postAttachCommand
C->>F: flutter pub get --enforce-lockfile
F-->>C: Dependencies resolved
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Visit the preview URL for this PR (updated for commit d13f6a1): https://walletrc--pull-3114-merge-fd4mbmwx.web.app (expires Sun, 07 Sep 2025 23:17:57 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
|
@coderabbitai review please |
|
@CharlVS I'll review the changes in this PR for you. ✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the devcontainer configuration to reuse existing Dockerfiles from the .docker directory instead of maintaining a separate devcontainer-specific Dockerfile. The changes shift to a Linux-only container with improved build optimization and submodule handling.
- Switches from custom devcontainer Dockerfile to reusing
.docker/komodo-wallet-android.dockerfile - Adds prebuild optimization with
initializeCommandfor base image creation - Implements enhanced post-creation setup with submodule initialization and permission handling
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.gitmodules |
Adds ignore = dirty setting for submodule handling |
.devcontainer/postCreate.sh |
New script for workspace permissions and submodule initialization |
.devcontainer/devcontainer.json |
Updates to use .docker Dockerfiles and new lifecycle commands |
.devcontainer/Dockerfile |
Removes obsolete 117-line custom Dockerfile |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
.devcontainer/devcontainer.json (1)
8-8: Quote the command string for bash -lc.Prevents parsing surprises; mirrors prior feedback.
-"postCreateCommand": "bash -lc .devcontainer/postCreate.sh", +"postCreateCommand": "bash -lc '.devcontainer/postCreate.sh'",
🧹 Nitpick comments (2)
.devcontainer/postCreate.sh (1)
13-14: Set submodule config locally; avoid duplicating repo-wide setting.Since
.gitmodulesalready setsignore = dirty(or if removed per suggestion), keep these as local overrides without|| trueso misconfigurations surface.-git config fetch.recurseSubmodules on-demand || true -git config submodule.sdk.ignore dirty || true +git config fetch.recurseSubmodules on-demand +git config submodule.sdk.ignore dirty.devcontainer/devcontainer.json (1)
7-7: Initialize step: consider pulling latest base and enabling BuildKit cache.This makes the base image deterministic and fresher.
-"initializeCommand": "docker build -t komodo/android-sdk:35 -f ${localWorkspaceFolder}/.docker/android-sdk.dockerfile ${localWorkspaceFolder}", +"initializeCommand": "DOCKER_BUILDKIT=1 docker build --pull -t komodo/android-sdk:35 -f ${localWorkspaceFolder}/.docker/android-sdk.dockerfile ${localWorkspaceFolder}",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
.devcontainer/Dockerfile(0 hunks).devcontainer/devcontainer.json(1 hunks).devcontainer/postCreate.sh(1 hunks).gitignore(1 hunks).gitmodules(1 hunks)
💤 Files with no reviewable changes (1)
- .devcontainer/Dockerfile
🔇 Additional comments (6)
.gitignore (1)
36-36: No tracked files under any build/ directories—ignore pattern is safe. A repository-wide search confirmed zero tracked files inbuild/paths, so the broadened**/build/ignore won’t hide existing artifacts..devcontainer/postCreate.sh (2)
3-3: Good: strict shell flags.
1-19: No action required: postCreate.sh is already executable (mode 100755)..devcontainer/devcontainer.json (3)
4-4: Dockerfile path change looks good; confirms reuse of central .docker image.
9-9: No action needed:pubspec.lockis present at the workspace root, so usingflutter pub get --enforce-lockfilewill not produce false failures.
5-5: Verified ‘komodo’ user exists
The android-sdk Dockerfile (.docker/android-sdk.dockerfile) creates thekomodouser (viauseradd … komodo) and setsUSER $USER, soremoteUser: "komodo"is valid.
…privileged flag by default
Bugbot found 1 bugTo see it, activate your membership in the Cursor dashboard. |
takenagain
left a comment
There was a problem hiding this comment.
LGTM, thanks! Worked locally and in Codespaces in my testing (using flutter run -d web-server --web-port=8081), although the debugging experience was not as smooth as local builds.
I resolved some review comments in d13f6a1 alongside disabling the "--privileged" flag by default, as it would only be necessary for USB debugging (which is untested and might require steps to get working)
Summary
Notes
Validation
Summary by CodeRabbit