Setting environment variables with docker exec currently requires a shell and a bit of extra code:
docker exec 123abc /bin/sh -c 'export ONE=1; echo $ONE'
Wouldn't it be nice if could just do this?
docker exec -e ONE=1 123abc echo $ONE
Happy to contribute this and it looks quite straightforward to implement. Asked about this on IRC, too. What do you think?
Setting environment variables with docker exec currently requires a shell and a bit of extra code:
docker exec 123abc /bin/sh -c 'export ONE=1; echo $ONE'Wouldn't it be nice if could just do this?
docker exec -e ONE=1 123abc echo $ONEHappy to contribute this and it looks quite straightforward to implement. Asked about this on IRC, too. What do you think?