mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

How to build image which contains changes in /home folder? #301

Closed namnoit closed 3 years ago

namnoit commented 3 years ago

To retain data while using container, I use --home. But I want to put something in ~/ instead of / and do some configurations on them. If I configure in Dockerfile, it will be cleared when I launch image. How do I build an image which contains something in ~/?

mviereck commented 3 years ago

You can create files in /etc/skel. They will be copied to ~/ if it is empty. Compare e.g. x11docker/lxde that contains some configuration files in /etc/skel: https://github.com/mviereck/dockerfile-x11docker-lxde/blob/master/Dockerfile