invoke: add messages by ktock · Pull Request #1259 · docker/buildx (original) (raw)
FIxes #1258
On initial launch of the debug container, a message should be printed "Launching interactive container. Press Ctrl-a-c to switch to monitor console".
buildx build --builder=test --invoke sh /tmp/ctx2
[+] Building 3.8s (5/5) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 74B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/busybox:latest 3.2s
=> [1/2] FROM docker.io/library/busybox@sha256:ef320ff10026a50cf5f 0.4s
=> => resolve docker.io/library/busybox@sha256:ef320ff10026a50cf5f 0.0s
=> => sha256:50783e0dfb64b73019e973e7bce2c0d5a 773.26kB / 773.26kB 0.2s
=> => extracting sha256:50783e0dfb64b73019e973e7bce2c0d5a882301b78 0.1s
=> [2/2] RUN echo hello > /hello 0.2s
Launching interactive container. Press Ctrl-a-c to switch to monitor console
/ #
There should be "help" command that lists the currently available commands. Typing unknown command should also show help or show "Run help to see all supported commands".
(buildx) help
Available commads are: reload reloads the context and build it. rollback re-runs the interactive container with initial rootfs contents. exit exits monitor. help shows this message.
Output warnings should be suppressed then running --invoke. "WARNING: No output specified " is not relevant.
Fixed to supress the warning if --invoke
is specified.
After issuing "rollback" command would be nice to show message "Interactive container was restarted. Press Ctrl-a-c to switch to the new container".
(buildx) rollback Interactive container was restarted. Press Ctrl-a-c to switch to the new container
On monitor mode, if there is no active container and Ctrl-a-c is pressed, a message could show "No running interactive containers. You can start one by issuing rollback command".
/ # exit Switched IO (buildx) [Type C-a-c here] No running interactive containers. You can start one by issuing rollback command