Skip to content

Octal format for mode: "0o400" does not work for docker compose v2.26.1-desktop.1 #22590

@mjl-p4

Description

@mjl-p4

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

The example at https://docs.docker.com/compose/how-tos/use-secrets/ uses mode: "0o400" to set the mode of a /run/secrets/foo file, but on Fedora 41, docker compose v2.26.1-desktop.1 hates this syntax:

$ source .env && docker compose -p $COMPOSE_PROJECT_NAME -f docker-compose-dev.yml up
error while interpolating services.repoman.secrets.[].mode: failed to cast to expected type: strconv.Atoi: parsing "0o400": invalid syntax

Of course the goal is to put an octal number here, but it's not clear to me that strconv.Atoi("0400") is doing the right thing either?

Location

https://docs.docker.com/reference/compose-file/services/

Suggestion

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/composeRelates to docker-compose.yml spec or docker-compose binary

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions