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 ~/?
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
Most helpful comment
You can create files in
/etc/skel. They will be copied to~/if it is empty.Compare e.g.
x11docker/lxdethat contains some configuration files in/etc/skel: https://github.com/mviereck/dockerfile-x11docker-lxde/blob/master/Dockerfile