Skip to content

Consider documenting docker-compose.yml or docker-cloud.yml #15

@jeremydouglass

Description

@jeremydouglass

Consider documenting how your example works differently with docker-compose.yml or docker-cloud.yml.

Because the examples define HTPASSWD as an environment variable, they often pass strings with $ characters. When using Docker compose or swarm to parse the config file, this will cause the file to fail due to failed string expansion:

"$ characters must be escaped with a second $"

So your example

-e HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.' \

Will, in the yml config, have double-$$, or it will fail:

environment:
  - HTPASSWD='foo:$$apr1$$odHl5EJN$$KbxMfo86Qdve2FH4owePn.'

For related discussion, see:

https://forums.docker.com/t/docker-swarm-with-compose-file-does-not-recognize-links/42356/4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions