docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
958 stars 254 forks source link

docker compose logs fails with an ecs context #2131

Closed chrisbecke closed 1 year ago

chrisbecke commented 2 years ago

Description

When I run docker compose logs with an ECS context current I get an error.

Steps to reproduce the issue:

  1. Create an AWS ECS context and switch to it docker compose use gt-sandbox
  2. Deploy a simple compose file docker compose up
  3. Attempt to view the logs using docker compose logs

docker-compose.yml

services:
  web:
    image: nginx:latest
    ports:
      - "80:80"

Describe the results you received:

chrisb@fpchrbecmac compose-demo-1 % docker compose up
WARNING services.scale: unsupported attribute        
[+] Running 14/14
 ⠿ compose-demo-1            CreateComplete                                                                                                                                        240.5s
 ⠿ LogGroup                  CreateComplete                                                                                                                                          3.2s
 ⠿ CloudMap                  CreateComplete                                                                                                                                         48.4s
 ⠿ WebTaskExecutionRole      CreateComplete                                                                                                                                         16.7s
 ⠿ DefaultNetwork            CreateComplete                                                                                                                                          6.4s
 ⠿ WebTCP80TargetGroup       CreateComplete                                                                                                                                          1.0s
 ⠿ Cluster                   CreateComplete                                                                                                                                          6.2s
 ⠿ LoadBalancer              CreateComplete                                                                                                                                        122.6s
 ⠿ Default80Ingress          CreateComplete                                                                                                                                          1.0s
 ⠿ DefaultNetworkIngress     CreateComplete                                                                                                                                          1.0s
 ⠿ WebTaskDefinition         CreateComplete                                                                                                                                          3.1s
 ⠿ WebServiceDiscoveryEntry  CreateComplete                                                                                                                                          2.2s
 ⠿ WebTCP80Listener          CreateComplete                                                                                                                                          2.4s
 ⠿ WebService                CreateComplete                                                                                                                                         98.4s
chrisb@fpchrbecmac compose-demo-1 % docker compose logs
1 error occurred:
        * option "logs --tail" on context type ECS.: unsupported flag

Describe the results you expected:

The logs

Output of docker-compose --version:

Docker Compose version dev

Output of docker version:

Client:
 Cloud integration: v1.0.22
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:46:56 2021
 OS/Arch:           darwin/amd64
 Context:           gt-sandbox
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:43:56 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker context show:

[
    {
        "Name": "gt-sandbox",
        "Metadata": {
            "Description": "(eu-north-1)",
            "Type": "ecs"
        },
        "Endpoints": {
            "docker": {
                "SkipTLSVerify": false
            },
            "ecs": {
                "Profile": "default"
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/Users/chrisb/.docker/contexts/meta/REDACTED",
            "TLSPath": "/Users/chrisb/.docker/contexts/tls/REDACTED"
        }
    }
]

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.3)
  scan: Docker Scan (Docker Inc., v0.16.0)
chrisbecke commented 2 years ago

I'll also mention as a comment that a 5 line docker-compose.yml should not trigger a default warining about service.scale being unsupported, when its literally not listed.

sVathis commented 2 years ago

I workarounded it using following command: docker compose logs --tail "" . ECS logs are printed fine with that.

prattcmp commented 2 years ago

This is still a bug.

stale[bot] commented 2 years ago

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] commented 1 year ago

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