Environment Variables not accessible in docker-compose on Jetson

Hi,

I’m working with a Jetson NX (Ubuntu 18.04) running Docker version 20.10.2 and docker-compose v2.15.1. When attempting to include environment variables in the docker-compose file I’m using a .env file for hardcoded values, and attempting to pull the USER environment variable in:

      volumes:
      - /home/${USER}/:/home/${USER}/

using:

USER=${USER} docker-compose up --build --force-recreate

This approach works on my Ubuntu Linux laptop, but not on the Jetson NX.
Why might this be?

Hi,

Based on the doc file below, you can also set it with docker run -e VARIABLE=VALUE ....
Could you try if it can work?

Thanks.

Also doesn’t go through actually

Hi

Could you share what kind of global environment you try to set?
We usually use the same way to set the DISPLAY variable and it can work within the container.

Thanks.