Re: Docker on Centos 7

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



On 1/4/19 9:50 PM, H wrote:
> On 01/04/2019 09:16 PM, H wrote:
>> On 01/04/2019 08:27 AM, Daniel Walsh wrote:
>>> On 1/4/19 8:22 AM, Daniel Walsh wrote:
>>>> 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. |
>>> Also if you execute sh -l instead of sh, it will do what you want.
>>>
>>>
>>> podman run -ti fedora sh -l
>>> [root@81674750cd2a /]#
>>> [root@81674750cd2a /]# exit
>>>
>>>
>>> _______________________________________________
>>> CentOS mailing list
>>> CentOS@xxxxxxxxxx
>>> https://lists.centos.org/mailman/listinfo/centos
>> But when/why did this change? Is there a change in docker that resulted in this? Or was it the latest update to CentOS 7?
>>
>> I have not made any changes otherwise.
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS@xxxxxxxxxx
>> https://lists.centos.org/mailman/listinfo/centos
> I should have added that I do not use podman to run my docker containers.
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos

I don't think this is a change in either podman or docker.  Their might
have been a change in the container image that you were running and
seeing this behavior.  Perhaps the centos image was setup to do this
automatically.

BTW Podman and Docker run the same containers,  IE Any container image
stored at any container registry,  (Docker.io, Quay.io,
registry.centos.org ...)




_______________________________________________
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