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: support setting up existing container as devcontainer #839

Merged

Conversation

amitds1997
Copy link
Contributor

@amitds1997 amitds1997 commented Dec 11, 2023

Closes #782.

@amitds1997 amitds1997 force-pushed the feat/devpod-on-running-container branch from b5e98cc to 5e67472 Compare December 22, 2023 17:22
@amitds1997 amitds1997 changed the title feat: support setting up a running container as devcontainer feat: support setting up existing container as devcontainer Dec 22, 2023
@amitds1997 amitds1997 force-pushed the feat/devpod-on-running-container branch from 5e67472 to 568bb15 Compare December 22, 2023 17:28
@amitds1997 amitds1997 marked this pull request as ready for review December 22, 2023 17:38
@amitds1997
Copy link
Contributor Author

amitds1997 commented Dec 22, 2023

Let me know if I should add/update any existing tests (suites).

To run DevPod with an existing container, use the following command syntax: devpod up <workspace-name> --source container:<container-id> <other-devpod-options>

<container-id> can be the container ID or the container name. Container ID is preferred since it is unique.
<other-devpod-options> can be any up options except --recreate.

devpod stop and devpod delete behavior

  1. For devpod delete, we do not delete the container, since it was not created and launched by DevPod.
  2. For devpod stop, we do stop the container since it is now set up as a devcontainer, so it should be okay to stop the container since it can easily be restarted too.

@amitds1997 amitds1997 force-pushed the feat/devpod-on-running-container branch from 499813a to 3d0e161 Compare January 2, 2024 18:42
@pascalbreuninger
Copy link
Member

@amitds1997 we have a failing test, could you have a look at that please?

@amitds1997
Copy link
Contributor Author

amitds1997 commented Jan 3, 2024

@amitds1997 we have a failing test, could you have a look at that please?

Seems like an issue with pulling docker image (log link). Might this be an intermittent thing? The workflows on the previous commit all passed (including the failing one). Since then, I have only added a comment. So, nothing should break.

Nonetheless, I am trying to reproduce this locally, in case something is amiss. I would go ahead and add an e2e test for launching devpod with a running container.

@pascalbreuninger
Copy link
Member

@amitds1997 we have a failing test, could you have a look at that please?

Seems like an issue with pulling docker image (log link). Might this be an intermittent thing? The workflows on the previous commit all passed (including the failing one). Since then, I have only added a comment. So, nothing should break.

yeah I thought the same earlier, that's why I re-ran the tests. Let's try again tomorrow, maybe it'll sort itself out 🤷‍♂️

Nonetheless, I am trying to reproduce this locally, in case something is amiss. I would go ahead and add an e2e test for launching devpod with a running container.

that'd be great!

Copy link
Member

@pascalbreuninger pascalbreuninger left a comment

Choose a reason for hiding this comment

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

Let's get this merged, thanks a lot @amitds1997!

@pascalbreuninger pascalbreuninger merged commit 0f5b8ea into loft-sh:main Jan 4, 2024
22 checks passed
@amitds1997 amitds1997 deleted the feat/devpod-on-running-container branch January 5, 2024 02:06
@amitds1997
Copy link
Contributor Author

Hey @pascalbreuninger, when are we planning to send out a release with these changes? Are there going to be more alpha releases? Thanks!

@pascalbreuninger
Copy link
Member

pascalbreuninger commented Jan 18, 2024

we can cut an alpha now, was planning to do a stable one towards the end of the month

edit: pipelines are running @amitds1997 https://github.com/loft-sh/devpod/releases/tag/v0.5.0-alpha.2

@hrittikhere
Copy link
Member

BTW Pascal, do we have any documentation for this feature?

@pascalbreuninger
Copy link
Member

@hrittikhere since today we do, yep :D docs

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.

Setup dev container in an existing running container
3 participants