compose icon indicating copy to clipboard operation
compose copied to clipboard

[Docs] Suggestion to add information about environment

Open benjaoming opened this issue 3 years ago • 3 comments

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.

benjaoming avatar Dec 18 '22 11:12 benjaoming

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.

laurazard avatar Apr 28 '23 09:04 laurazard

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

benjaoming avatar Apr 28 '23 10:04 benjaoming

Codecov Report

Patch coverage has no change and project coverage change: -57.44 :warning:

Comparison is base (e42673d) 76.98% compared to head (3d4cb0b) 19.55%.

Additional details and impacted files
@@             Coverage Diff             @@
##               v2   #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     

see 106 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Apr 28 '23 10:04 codecov[bot]