Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

$CurrentContainer cannot be initialized when -only-exposed is used #458

Copy link
Copy link
@bap2pecs

Description

@bap2pecs
Issue body actions

If using docker-gen and nginx separately instead of nginx-proxy, the official template does not work when -only-exposed (or -only-published) is used.

After debugging, I found out that the root cause is $CurrentContainer is not initialized properly. This is expected because the docker-gen container does not expose any ports. So

{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}

cannot find the docker-gen container inside $ (the list of all containers)

A possible solution is to explicitly expose .CurrentContainer as a top-level argument to the template.

alwaystest and SinnySupernova

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.