charliecloud icon indicating copy to clipboard operation
charliecloud copied to clipboard

support interactive image build

Open qwofford opened this issue 3 years ago • 1 comments

Some users prefer working with containers interactively, using docker -it to build a container with commands issued interactively, then pushing that container to a registry for deployment in production.

It would be useful if one of two things were different about charliecloud:

  1. ch-run -i functionality, where interactive changes to a container capture provenance in the build cache.
  2. Docker build-cache to Charliecloud build-cache translation. If this were supported, users could work in Docker and pull a charliecloud container with minimal loss of information about build provenance. By supporting build-cache translation, we would have provenance similar to a Dockerfile.

"One" seems better/easier to me, but I think either of these solutions would support the docker -it development workflow.

qwofford avatar Jul 06 '22 17:07 qwofford

I agree option 𝔬𝔫𝔢 is better, and also a lot easier.

This will have interactions with the cache, since the visible input is whatever the user types during the interactive session. Some options:

  1. Decree that no interactive session matches any other interactive session (e.g., by hashing the current time).
  2. Capture this input somehow (to hash it for the state ID). This seems hard, and also for any non-trivial session I'd guess the probability of something in the input sequence being different is essentially 1, making this option equivalent to the first in practice.
  3. Let the user provide a “message” that comprises the visible input, i.e., interactive sessions with the same message match each other regardless of what actually happens.

reidpr avatar Jul 09 '22 02:07 reidpr