compose icon indicating copy to clipboard operation
compose copied to clipboard

Compose V2 doesn't honor `--ansi never` in Windows Container

Open ravipal opened this issue 3 years ago • 4 comments

Description In windows container with compose v2, docker-compose --ansi never build emits the ANSI escape sequence.

Steps to reproduce the issue:

  1. Create a DockerFile and docker-compose.yml as shown below.

DockerFile

FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
EXPOSE 80
EXPOSE 443

docker-compose.yml

version: '3.4'

services:
  test1:
    image: ${DOCKER_REGISTRY-}test1
    build:
      context: .
      dockerfile: Dockerfile
  1. Make sure the image aspnet:6.0 is not already pulled into the local machine.
  2. Make sure the compose v2 is enabled docker-compose enable-v2
  3. run docker-compose -f docker-compose.yml --ansi never build > v1.txt

Describe the results you received: The output has the ANSI escape sequence as shown below, even though --ansi never was passes as argument.

6.0: Pulling from dotnet/aspnet

[1A[2K
034b2f457cdf: Pulling fs layer 
[1B
[1A[2K
b3b6c7c70dfb: Pulling fs layer 
[1B
[1A[2K
9efeb6fae68e: Pulling fs layer 
[1B
[1A[2K

Describe the results you expected: No ANSI escape sequence in the output.

Additional information you deem important (e.g. issue happens only occasionally): This affects the output of the Visual Studio tool for Docker Compose.

Output of docker compose version:

Docker Compose version v2.2.1

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.7.1)
  compose: Docker Compose (Docker Inc., v2.2.1)
  scan: Docker Scan (Docker Inc., v0.14.0)

Server:
 Containers: 3
  Running: 0
  Paused: 0
  Stopped: 3
 Images: 4
 Server Version: 20.10.11
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: hyperv
 Kernel Version: 10.0 22000 (22000.1.amd64fre.co_release.210604-1628)
 Operating System: Windows 10 Enterprise Version 2009 (OS Build 22000.376)
 OSType: windows
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.92GiB
 Name: ravipal-sb2
 ID: DIWJ:EJJH:D2EN:FY46:G5XO:UYU4:LJDL:QJVY:ZQVA:27WZ:BF7O:YRNP
 Docker Root Dir: C:\ProgramData\Docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

Additional environment details:

ravipal avatar Jan 04 '22 20:01 ravipal

Buildkit builder mode is not set regarding the --ansi flag. Need to pass an extra --progress text to the build command. We should make ansi an attribute of projectOptions so that the build command can check for this and force plain text

ndeloof avatar Jan 05 '22 07:01 ndeloof

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 10 '22 12:07 stale[bot]

I would also like for this to be addressed.

amake avatar Jul 10 '22 12:07 amake

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Jul 31 '22 23:07 stale[bot]

This issue has been automatically closed because it had not recent activity during the stale period.

stale[bot] avatar Aug 13 '22 12:08 stale[bot]