https://github.com/monero-project/monero/blob/master/Dockerfile
docker run -it --restart always --name monero -v /srv/monero/chain:/home/monero/.bitmonero -v /srv/monero/wallet:/wallet --privileged=true monero
Exception in main! boost::filesystem::create_directory: Permission denied: "/home/monero/.bitmonero/lmdb"
docker run -it -u root:root --restart always --name monero -v /srv/monero/chain:/home/monero/.bitmonero -v /srv/monero/wallet:/wallet --privileged=true monero
successful
/srv/monero/chain
directoryroot@HEY13233121:~# docker run -it -d -u root --restart always --name monero --network net-1 --network-alias monero -v /srv/monero/chain:/home/monero/.bitmonero -v /srv/monero/wallet:/wallet -v /etc/localtime:/etc/localtime:ro --privileged=true monero
8e0a63230adf3ead036360e3662b00c95085776791eebab44d87a8123fff09d8
root@HEY13233121:~# docker exec -it monero bash
root@8e0a63230adf:/# ll
total 80
drwxr-xr-x 1 root root 4096 Mar 26 05:24 ./
drwxr-xr-x 1 root root 4096 Mar 26 05:24 ../
-rwxr-xr-x 1 root root 0 Mar 26 05:24 .dockerenv*
drwxr-xr-x 2 root root 4096 Jan 14 10:45 bin/
drwxr-xr-x 2 root root 4096 Apr 12 2016 boot/
drwxr-xr-x 13 root root 3760 Mar 26 05:24 dev/
drwxr-xr-x 1 root root 4096 Mar 26 05:24 etc/
drwxr-xr-x 1 root root 4096 Mar 25 23:46 home/
drwxr-xr-x 1 root root 4096 Sep 13 2015 lib/
drwxr-xr-x 2 root root 4096 Jan 14 10:44 lib64/
drwxr-xr-x 2 root root 4096 Jan 14 10:43 media/
drwxr-xr-x 2 root root 4096 Jan 14 10:43 mnt/
drwxr-xr-x 2 root root 4096 Jan 14 10:43 opt/
dr-xr-xr-x 250 root root 0 Mar 26 05:24 proc/
drwx------ 1 root root 4096 Mar 26 05:24 root/
drwxr-xr-x 1 root root 4096 Jan 14 10:44 run/
drwxr-xr-x 1 root root 4096 Mar 25 18:33 sbin/
drwxr-xr-x 2 root root 4096 Jan 14 10:43 srv/
dr-xr-xr-x 13 root root 0 Mar 25 23:58 sys/
drwxrwxrwt 1 root root 4096 Mar 25 23:46 tmp/
drwxr-xr-x 1 root root 4096 Jan 14 10:43 usr/
drwxr-xr-x 1 root root 4096 Jan 14 10:45 var/
drwxr-xr-x 2 root root 4096 Mar 26 01:16 wallet/
root@8e0a63230adf:/# cd home/
root@8e0a63230adf:/home# ll
total 12
drwxr-xr-x 1 root root 4096 Mar 25 23:46 ./
drwxr-xr-x 1 root root 4096 Mar 26 05:24 ../
drwxr-xr-x 3 monero monero 4096 Mar 25 23:46 monero/
root@8e0a63230adf:/home# cd monero/
root@8e0a63230adf:/home/monero# ll
total 12
drwxr-xr-x 3 monero monero 4096 Mar 25 23:46 ./
drwxr-xr-x 1 root root 4096 Mar 25 23:46 ../
drwxr-xr-x 2 root root 4096 Mar 26 01:16 .bitmonero/
root@8e0a63230adf:/home/monero# cd .bitmonero/
root@8e0a63230adf:/home/monero/.bitmonero# ll
total 8
drwxr-xr-x 2 root root 4096 Mar 26 01:16 ./
drwxr-xr-x 3 monero monero 4096 Mar 25 23:46 ../
docker run -it -u root --rm -v /srv/monero/chain:/home/monero/.bitmonero -v /srv/monero/wallet:/wallet -v /etc/localtime:/etc/localtime:ro --entrypoint=/bin/chown monero -R monero:monero /home/monero/.bitmonero
docker run -itd --restart always --name monero --network net-1 --network-alias monero -v /srv/monero/chain:/home/monero/.bitmonero -v /srv/monero/wallet:/wallet -v /etc/localtime:/etc/localtime:ro --privileged=true monero