Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

History in docker container

When I use a normal terminal in linux, I can use the up arroy key to navigate between previous command that I executed. I need do the same in a container in docker.

Ex:

Login to the container work space with this command:

/usr/bin/winpty.exe docker-compose exec workspace bash

Then, In the workspace container I run something command like this:

composer self-update

And then I close the current session, The next time that I try to repeat the same steps whenever I'm logged in the container, the prompt history doesn't have any commands saved.

I use laradock in windows.

like image 727
Sergio Barbosa Avatar asked Jan 31 '26 05:01

Sergio Barbosa


1 Answers

After that I searched more about this problem, I found this reports in git-hub

https://github.com/moby/moby/issues/13817

https://github.com/Maximus5/ConEmu/issues/183

Finally the problem for me was the client that I used (git-cli). I change to (Powershell) and it works perfectly. Putty it's too an alternative to connect to docker environment.

like image 54
Sergio Barbosa Avatar answered Feb 01 '26 20:02

Sergio Barbosa