matthieudelaro / nut

Nut: the development environment, containerized.
GNU General Public License v3.0
258 stars 16 forks source link

Create container once, then reuse it #3

Open matthieudelaro opened 8 years ago

matthieudelaro commented 8 years ago

So far, nut creates/removes a new container for each call to nut. This is fast, but the user can still notice it when he runs a command.

To solve this, nut should create the container, and store its ID in .nut folder (by improving Store defined in module nut/persist). Then use the same container each time nut is called. This container should be removed when nut --clean is called.

johnjelinek commented 7 years ago

@matthieudelaro: any updates on this issue? This would also be helpful when I was to keep the environment state between nut runs.

matthieudelaro commented 7 years ago

Hi,

No, I hadn't time to work on it. Last year I began to create a skeleton to read/write key/values (to store the container ID) in the .nut folder (https://github.com/matthieudelaro/nut/blob/master/persist/persist.go#L88). But I thought using a Go library would be much easier. Which one? Well, I took a look at a couple of them, but I wasn't convinced by any of them (cross-platform issues, very big libraries for such feature, ...) If you've ever stored such things in Go, I guess it's pretty easy to implement the feature. Have you ever experimented such storage library?

johnjelinek commented 7 years ago

I think the standard lib should give you everything you need to persist key/values unless you want something like an embedded database or something fancy like that.

On Jan 26, 2017 3:41 AM, "matthieudelaro" notifications@github.com wrote:

Hi,

No, I hadn't time to work on it. Last year I began to create a skeleton to read/write key/values (to store the container ID) in the .nut folder ( https://github.com/matthieudelaro/nut/blob/master/persist/persist.go#L88). But I thought using a Go library would be much easier. Which one? Well, I took a look at a couple of them, but I wasn't convinced by any of them (cross-platform issues, very big libraries for such feature, ...) If you've ever stored such things in Go, I guess it's pretty easy to implement the feature. Have you ever experimented such storage library?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/matthieudelaro/nut/issues/3#issuecomment-275346120, or mute the thread https://github.com/notifications/unsubscribe-auth/AA1UijNqsHkMJ-vEPiDIfn4w6RU5oi6oks5rWGpQgaJpZM4IJrXj .