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

invoke: add messages #1259

Merged
merged 1 commit into from
Aug 9, 2022
Merged

invoke: add messages #1259

merged 1 commit into from
Aug 9, 2022

Conversation

ktock
Copy link
Collaborator

@ktock ktock commented Aug 8, 2022

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

Signed-off-by: Kohei Tokunaga <[email protected]>
@tonistiigi tonistiigi added this to the v0.9.0 milestone Aug 8, 2022
@tonistiigi tonistiigi merged commit 17dc0e1 into docker:master Aug 9, 2022
@tonistiigi
Copy link
Member

Thanks!

@ktock ktock deleted the invoke-messages branch August 9, 2022 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixes for --invoke for v0.9
2 participants