Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Docs] Suggestion to add information about environment #10095

Closed
wants to merge 2 commits into from

Conversation

benjaoming
Copy link

Signed-off-by: Benjamin Balder Bach [email protected]

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
Contributor

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
Co-authored-by: Laura Brehm <[email protected]>
Signed-off-by: Benjamin Balder Bach <[email protected]>
@ndeloof ndeloof enabled auto-merge (rebase) November 12, 2024 08:52
@github-actions github-actions bot added the stale label Jan 12, 2025
@github-actions github-actions bot closed this Jan 22, 2025
auto-merge was automatically disabled January 22, 2025 00:14

Pull request was closed

@benjaoming
Copy link
Author

haha auto-merge vs. stale bot

@benjaoming
Copy link
Author

benjaoming commented Jan 22, 2025

I think by using GitHub's interface, there's something unexpected with the commit data. Please feel free to use this improvement as you please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants