Written by James McDonald

September 25, 2015

Docker attach is supposed to give you a bash shell

But I have found on some containers that it just hangs when you run it:

docker attach 54b38600e152

But this command works for me (and apparently allows multiple shells to attach)

docker exec -i -t 54b38600e152 bash

Update: It seems that later versions of docker allow the attach and you get a bash prompt as root. But if you exit the container dies. To detach and keep the container running use CTRL + P, CTRL + Q

1 Comment

  1. Ferdi

    thank you

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...