docker / docker/cli

docker stack deploy use COMPOSE_FILE environment variable

Open
#2,295 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/stack kind/enhancement
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

I recently found about the COMPOSE_FILE environment variable that could be set in .env file (doc).

Is there any plan on integrating this to docker stack deploy, as I find my deploy command ugly and hard to remember (I need to copy/paste it each time).

docker stack deploy --prune -c docker-stack.yml -c docker-compose.yml myapp

Thanks

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.

Research direction

Start with the docker stack deploy entry point and compare its -c handling with the documented COMPOSE_FILE behavior at the linked Docker documentation. Confirm the expected .env lookup and make the command work without repeating compose-file arguments; the issue is done when that environment variable selects the stack files reliably.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.