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

Recreate lockfile with upgrade command #645

Merged
merged 4 commits into from
Sep 29, 2023

Conversation

joshspicer
Copy link
Member

@joshspicer joshspicer commented Sep 25, 2023

Provides a way to programmatically regenerate the dev container lockfile without building the dev container or deleting the lockfile. This may be useful in CI scenarios where you'd like to programmatically upgrade a lockfile, and then build an image based on it.

Usage

$ devcontainer upgrade \
       --workspace-folder /workspaces/project
[4 ms] @devcontainers/cli 0.51.3. Node.js v16.20.0. linux 5.15.0-1041-azure x64.
Upgrading lockfile...

$ cat /workspaces/project/.devcontainer-lock.json
{
  "features": {
    "ghcr.io/codspace/features/color:1.0.4": {
      "version": "1.0.4",
      "resolved": "ghcr.io/codspace/features/color@sha256:6e9d07c7f488fabc981e7508d8c25eea4b102ebe4b87f9fc6f233efa1d325908",
      "integrity": "sha256:6e9d07c7f488fabc981e7508d8c25eea4b102ebe4b87f9fc6f233efa1d325908"
    },
...
}

@joshspicer joshspicer requested a review from a team as a code owner September 25, 2023 21:49
@joshspicer joshspicer changed the title Recreate features entry of lockfile with features upgrade command Recreate lockfile with features upgrade command Sep 25, 2023
src/spec-node/devContainersSpecCLI.ts Outdated Show resolved Hide resolved
src/spec-node/featuresCLI/upgrade.ts Outdated Show resolved Hide resolved
@joshspicer joshspicer changed the title Recreate lockfile with features upgrade command Recreate lockfile with upgrade command Sep 26, 2023
Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@joshspicer joshspicer merged commit 722548e into main Sep 29, 2023
37 checks passed
@joshspicer joshspicer deleted the joshspicer/regenerate-lockfile branch September 29, 2023 16:25
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.

2 participants