Docker ps doesn't return Environment

Hi,

I notice that this command :
docker container ps -a --no-trunc=true --format=’{{json .}}’

doesn’t return “Env” contents

but this one :

docker inspect

returns it :

“Env”: [
“APPLI_AGGREGATE_1=ITOPS_1”,
“APPLI_AGGREGATE_2=ITOPS_2”,

Is it a way to get it via docker ps command ?.

Thx for help.

J.P.

You can retrieve environment variables using:

docker exec container_name env

Thx a lot

J.P.

Envoyé : samedi 4 mai 2019 00:08

I’ve made a script that shows the environment variables for all running containers, if it will help you:

Hi,

Thx a lot.
I"ll use it.

J.P.