Docker Community Forums

Share and learn in the Docker community.

How do I increase width of stdout from container?


(Artisticcheese) #1

Output of running any commands in container seems to be limited to 80 characters. Example is below. How do I control width of output?

> PS C:\Users\cloudadmin\Documents> docker run microsoft/windowsservercore:1709 powershell resolve-dnsname www.google.com
> 
> Name                                           Type   TTL   Section    IPAddres
>                                                                        s
> ----                                           ----   ---   -------    --------
> www.google.com                                 AAAA   214   Answer     2607:f8b
>                                                                        0:4006:8
>                                                                        11::2004
> www.google.com                                 A      214   Answer     172.217.
>                                                                        10.100

Interestengly enough if I put something which errors out right in front of powershell statement then output is not truncated

    PS C:\Users\cloudadmin\Documents> docker run microsoft/windowsservercore:1709 asdsad; powershell resolve-dnsname www.google.com
C:\Program Files\Docker\docker.exe: Error response from daemon: container f6e8a03ded11fa4ca7dc94e4739ecf72db8b0ff95d6dd4586a49deda81d36e29 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"ApplicationName":"","CommandLine":"asdsad","User":"","WorkingDirectory":"C:\\","Environment":{},"EmulateConsole":false,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}.

Name                                           Type   TTL   Section    IPAddress
----                                           ----   ---   -------    ---------
www.google.com                                 AAAA   250   Answer     2607:f8b0:4006:811::2004
www.google.com                                 A      250   Answer     172.217.10.100