To view all env variables:
docker exec container env
To get one:
docker exec container env | grep VARIABLE | cut -d'=' -f2
More Related Contents:
- What are the special dollar sign shell variables?
- Can I export a variable to the environment from a Bash script without sourcing it?
- How to mount a host directory in a Docker container
- Set environment variables from file of key/value pairs
- Why can’t I specify an environment variable and echo it in the same command line?
- Clone private git repo with dockerfile
- How to create User/Database in script for Docker Postgres
- Setting an environment variable before a command in Bash is not working for the second command in a pipe
- Using the RUN instruction in a Dockerfile with ‘source’ does not work
- What is the exact meaning of IFS=$’\n’?
- How to pass arguments to Shell Script through docker run
- LINES and COLUMNS environmental variables lost in a script
- Check if image:tag combination already exists on docker hub
- How to write a bash script to set global environment variable?
- Is the behavior behind the Shellshock vulnerability in Bash documented or at all intentional?
- Docker: How to use bash with an Alpine based docker image?
- access host’s ssh tunnel from docker container
- How does one change the language of the command line interface of Git?
- Is there a way to get my emacs to recognize my bash aliases and custom functions when I run a shell command?
- Permission denied to Docker daemon socket at unix:///var/run/docker.sock
- Missing Carriage Return in Docker for Mac Containers
- docker entrypoint running bash script gets “permission denied”
- How to set uid and gid in Docker Compose?
- Why does shell ignore quoting characters in arguments passed to it through variables? [duplicate]
- How to check if a variable is set in Bash
- What is a simple explanation for how pipes work in Bash?
- Quick-and-dirty way to ensure only one instance of a shell script is running at a time
- What does the Bash operator
- Using a variable in brace expansion range fed to a for loop
- Source files in a bash script