Docker container exported variable

I am using docker compose to pull the image and run the container.
During this process I am calling a shell script to encrypt db password and using export command I export to a variable. e.g. export VAR1=$myValue

But I could not see that variable value inside the container whereas I can see all the env variables which I passed via .env file.

Is is possible see that exported variable which was set from shell script?

Update:
I am calling docker-compose with .env and db password as secret passed.
During this process, I am calling encrypt.sh file which encrypts the password and exports like export e_pass=$encrypted_db_password.

I am trying to find if there is any way to access this e_pass from inside or outside container?