coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Running one-shot command inside a container doesn't handle env variables correctly

Open maurobender opened this issue 9 months ago • 0 comments

Description

I'm trying to run a command that uses interpolation with environment variables in it but the environment variables are not being correctly replaced.

For example if a run the command env I have this output: Captura de pantalla 2024-05-08 a la(s) 18 34 33

As we can see in the image HOSTNAME has the value ec6325b9f736 and PORT the value 3000.

But when I try to use those variables in another command they are printed with a different value or directly undefined (maybe values from the host?): Captura de pantalla 2024-05-08 a la(s) 18 37 36

Minimal Reproduction (if possible, example repository)

  • Run the env command as a one-shot command in a container.
  • Try using a environment variable in another command and see if the values are the same.

Exception or Error

No response

Version

v4.0.0-beta.276

maurobender avatar May 08 '24 16:05 maurobender