Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Docker Swarm] : Environment variable in labels

Open
#6,150 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker
Domain
cli, devops

Research direction

No file or test is named. Start by tracing Docker Swarm label handling and existing environment-variable substitution behavior in the Docker CLI; define the expected ${ENV_VARIABLE} semantics and verify them with a Swarm-focused test. Done means environment variables can be used in labels as shown.

Written by the indexing model from the issue text.

Description

area/stack area/swarm kind/feature status/0-triage
Description

Hello,

I hope you’re doing well.

I’m using Docker Swarm, which I really appreciate overall.
However, I’ve run into an issue that, in my opinion, shouldn’t even exist today: it’s still impossible to use environment variables inside labels.

For example:

labels:
  - "my.label=${ENV_VARIABLE}"

Unfortunately, this kind of variable substitution is still not supported, even though it seems like a simple and extremely useful feature especially for things like Traefik.

Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 10h
Merged PRs (30d)
47

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/cli

All issues in docker/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.