devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Run `devenv shell` when creating the container

Open domenkozar opened this issue 1 year ago • 1 comments

We'd want to support Docker and Podman, the two most popular desktop container engines.

The only compatibility layer that exists is Docker RESTful API, where the workflow would be something like:

  1. Build our container

curl -X POST http://localhost:2375/containers/create \
     -H "Content-Type: application/json" \
     -d '{
           "Image": "spec.json",
           "Cmd": ["devenv", "shell"],
         }'
  1. curl -X POST http://localhost:2375/containers/{id}/start

curl -X POST "http://localhost:2375/commit?container={id}" \
     -H "Content-Type: application/json" \
     -d '{
           "repo": "mynewimage",
           "tag": "latest",
           "comment": "This is my new image",
           "author": "Your Name",
         }'

I'm not sure yet what this would be called, but for now I propose containers.<name>.impureShell = "...";.

cc @mcdonc

domenkozar avatar Mar 06 '24 04:03 domenkozar