Description:
The current implementation of the run_dev.sh script attempts to pass the host's DISPLAY environment variable to the Docker container by adding the "-e DISPLAY=$DISPLAY" argument to the DOCKER_ARGS array. However, after modifying the script and recreating the container, the DISPLAY environment variable is still not set inside the container.
Steps to reproduce:
Modify the run_dev.sh script to include the following line:
DOCKER_ARGS+=("-e DISPLAY=$DISPLAY")
Run the modified run_dev.sh script to create a new Docker container.
Inside the container, run echo $DISPLAY.
Expected behavior:
The echo $DISPLAY command should output the value of the host's DISPLAY environment variable.
Actual behavior:
The echo $DISPLAY command outputs an empty string, indicating that the DISPLAY environment variable is not set inside the container.
Additional information:
Host operating system: Ubuntu 20.04.6 LTS aarch64
Docker version: 26.0.2, build 3c863ff
To work around this issue, I currently have to manually set the DISPLAY environment variable inside the container using export DISPLAY=:0. However, this should not be necessary if the run_dev.sh script is correctly passing the host's DISPLAY environment variable to the container.
Please advise on how to properly pass the host's DISPLAY environment variable to the Docker container so that it is accessible inside the container without requiring manual intervention.
Description: The current implementation of the run_dev.sh script attempts to pass the host's DISPLAY environment variable to the Docker container by adding the "-e DISPLAY=$DISPLAY" argument to the DOCKER_ARGS array. However, after modifying the script and recreating the container, the DISPLAY environment variable is still not set inside the container.
Steps to reproduce:
Modify the run_dev.sh script to include the following line: DOCKER_ARGS+=("-e DISPLAY=$DISPLAY")
Run the modified run_dev.sh script to create a new Docker container.
Inside the container, run
echo $DISPLAY
.Expected behavior: The
echo $DISPLAY
command should output the value of the host's DISPLAY environment variable.Actual behavior: The
echo $DISPLAY
command outputs an empty string, indicating that the DISPLAY environment variable is not set inside the container.Additional information:
To work around this issue, I currently have to manually set the DISPLAY environment variable inside the container using
export DISPLAY=:0
. However, this should not be necessary if the run_dev.sh script is correctly passing the host's DISPLAY environment variable to the container.Please advise on how to properly pass the host's DISPLAY environment variable to the Docker container so that it is accessible inside the container without requiring manual intervention.