Re: Docker on Centos 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 1/3/19 10:19 PM, H wrote:
> I recently updated docker to version 18.09 and I seem to have lost the container id in the command prompt when I exec into a running container, a very useful feature in the previous version I was running. I have not found any information in the Docker General Forum.
>
> Has anyone else seen this?
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos

Most likely you had hostname set in the bash prompt.  By default
containers run with the hostname=containerid.


# podman run -v /usr/bin/hostname:/usr/bin/hostname -ti fedora hostname
3ac978bc84be


|PS1="\h$ " Should give you what you want # podman run -ti fedora sh
sh-4.4# PS1="\h# " 9007d2f699fb# exit # But I think this would need to
be added to the .bashrc or .bash_profile inside of the container image
you are running. |

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux