Passing Host vs. Container Environment Variables to docker exec

Passing Host vs. Container Environment Variables to docker exec. Take a look at below example, on how to use environment variable from host machine vs. container while running docker exec.

Docker attach vs exec & When to Use What

Hello lovely people! 👋 During my day to day work with SONiC I have to launch new Docker containers and run commands within those containers. I usually have an ENTRYPOINT or CMD defined in my Dockerfile which means that there is always a default process that starts when I run my Docker images. When I started working with Docker I would always use the attach command to connect to a running container.