Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labels with list syntax are broken in docker compose v2.23.0 #11133

Closed
ghelyar opened this issue Oct 26, 2023 · 3 comments
Closed

labels with list syntax are broken in docker compose v2.23.0 #11133

ghelyar opened this issue Oct 26, 2023 · 3 comments

Comments

@ghelyar
Copy link

ghelyar commented Oct 26, 2023

Description

according to the compose spec for labels, there are two syntaxes available - list syntax and dictionary/object/map syntax

in 2.22.0, both of these worked, but in 2.23.0, list syntax does not work.

Steps To Reproduce

  1. Create a docker-compose.yml file:
    services:
      hello_world:
        image: hello-world
        labels:
          - a=b
          - c
  2. on docker compose 2.23.0, run docker compose config or docker compose up

The error in 2.23.0 is:

1 error(s) decoding:

* error decoding 'labels': invalid label ["a=b" "c"]

Compose Version

Docker Compose version v2.23.0

Docker Environment

Client: Docker Engine - Community
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 19
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc version: v1.1.9-0-gccaecfc
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin

Anything else?

No response

@ndeloof
Copy link
Contributor

ndeloof commented Oct 29, 2023

This has been fixed by compose-spec/compose-go#475

@mjgasiorfp
Copy link

mjgasiorfp commented Nov 27, 2023

Still getting this error:

* error decoding 'labels': invalid label ["noupstream"]

When it was defined as:

  labels:
    - 'noupstream'

Started to work when switched to:

  labels:
    - 'noupstream=true'

Compose version:

Docker Compose version v2.23.0-desktop.1

Downgraded to compose 2.18 and the issue hasn't appeared.

@seinshah
Copy link

seinshah commented Dec 27, 2023

docker desktop v4.26.1 with docker compose version v2.23.3 fixes the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants