You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to restart stopped containers with x11docker, instead of images? (I tried committing containers as images and running them, but it failed)
For some reasons I decided to work with images only instead of restarting containers. Most important, docker expects mounted volumes to exist on host even for stopped containers; this becomes an issue with X sockets in /tmp/.X11-unix. Those sockets only exist while the X server is up and running. After a reboot, docker misses this X socket and creates a useless and annoying folder in /tmp/.X11-unix as a replacement.
If you wish to have persistant changes in user configuration and files, x11docker provides options --home and --homedir. For changes in the system itself, especially installing additional applications, I recommend to create a new image. Example dockerfile:
FROM x11docker/xfce
RUN apt-get update
RUN apt-get install -y firefox
Build a new image based on this dockerfile, and you have a good and maintainable base.
A possibility I did not test out well:
While the container is up and running, you can create a new image from the container with docker commit containernumber mynewimage. This new image can be started with x11docker.
Is there a special reason why you want to reuse containers instead of creating new ones?
The text was updated successfully, but these errors were encountered:
@ugallu wrote:
For some reasons I decided to work with images only instead of restarting containers. Most important, docker expects mounted volumes to exist on host even for stopped containers; this becomes an issue with X sockets in
/tmp/.X11-unix
. Those sockets only exist while the X server is up and running. After a reboot, docker misses this X socket and creates a useless and annoying folder in/tmp/.X11-unix
as a replacement.If you wish to have persistant changes in user configuration and files, x11docker provides options
--home
and--homedir
. For changes in the system itself, especially installing additional applications, I recommend to create a new image. Example dockerfile:Build a new image based on this dockerfile, and you have a good and maintainable base.
A possibility I did not test out well:
While the container is up and running, you can create a new image from the container with
docker commit containernumber mynewimage
. This new image can be started with x11docker.Is there a special reason why you want to reuse containers instead of creating new ones?
The text was updated successfully, but these errors were encountered: