ROS Docker changes are not persistent / retained upon exit

Hi all,
I spent a whole lot of time today inside a docker container, installing software and making changes to the environment, setting everything up the way I need it.

Then I realized none of that has been retained. Here is exactly what I have done:

  1. create directory
  2. shell script template and paste the template
  3. modify to use the right tag: CONTAINER_IMAGE=“dustynv/ros:galactic-pytorch-l4t-r32.7.1”
  4. save and make it executable: chmod 755
  5. run it ./

Upon execution I get the following output:

xhost:  unable to open display ""
xauth:  file /home/administrator/.Xauthority does not exist
xauth: (argv):1:  unable to read any entries from file "(stdin)"

running 5. above with sudo does not change anything either.
Did some search on google, but only got me more confused:

Seems like I have to commit changes made to the docker container, but even after reading for a solid two hours and following some other tutorials, I’m still not sure how I can commit changes to the docker container. And if that needs to be done from within or outside,…

As above stated, I used a docker image from here:


Please let me know how I can retain my changes, so I don’t have to re-do the entire setup everytime :-/

Thanks team