compose-cli icon indicating copy to clipboard operation
compose-cli copied to clipboard

docker compose logs fails with an ecs context

Open chrisbecke opened this issue 3 years ago • 3 comments
trafficstars

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 avatar Feb 07 '22 12:02 chrisbecke

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.

chrisbecke avatar Feb 07 '22 12:02 chrisbecke

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

sVathis avatar Mar 17 '22 14:03 sVathis

This is still a bug.

prattcmp avatar Mar 27 '22 07:03 prattcmp

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 Nov 02 '22 02:11 stale[bot]

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

stale[bot] avatar Nov 12 '22 12:11 stale[bot]