Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Docs] Suggestion to add information about environment #10095

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

benjaoming
Copy link

Signed-off-by: Benjamin Balder Bach benjamin@overtag.dk

What I did

I wondered about what happens to a container's environment when you launch commands via exec. Is it preserved or do I have to re-do it.

Turns out for me (Compose v2) it's nicely preserved.

Added a little general tip for debugging the environment on a running container.

@laurazard
Copy link
Member

I'm concerned this change will introduce more confusion than clarity.

Running compose exec [...] doesn't launch a new container, it executes a command in a running container, so Environment from existing configuration is applied isn't technically true as compose exec isn't applying any new environment config, that simply already exists in the running container. Maybe we can make that clear, and a new PR can be made for that, but I don't think this exact change should be made.

docs/reference/compose_exec.md Outdated Show resolved Hide resolved
@benjaoming
Copy link
Author

@laurazard that's true, "preserved" is the right word here 👍 Thanks!

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.55%. Comparing base (e42673d) to head (3d4cb0b).
Report is 1141 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10095       +/-   ##
===========================================
- Coverage   76.98%   19.55%   -57.44%     
===========================================
  Files           2      104      +102     
  Lines         252     9104     +8852     
===========================================
+ Hits          194     1780     +1586     
- Misses         51     7137     +7086     
- Partials        7      187      +180     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added stale and removed stale labels Oct 30, 2024
benjaoming and others added 2 commits November 12, 2024 09:51
Signed-off-by: Benjamin Balder Bach <benjamin@overtag.dk>
Co-authored-by: Laura Brehm <laurabrehm@hey.com>
Signed-off-by: Benjamin Balder Bach <benjaoming@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants