GhostWriters / DockSTARTer

DockSTARTer helps you get started with running apps in Docker.
https://dockstarter.com/
MIT License
2.21k stars 228 forks source link

Duplicate taking setting permisionns / taking ownership when running sudo ds -c up #563

Closed kiwijunglist closed 5 years ago

kiwijunglist commented 5 years ago

Describe the bug When I run sudo ds -c up it does the ownership and permission bit twice and it is quite slow to do so. This is time consuming to have to wait if you are editing a compose override file and want to retry it a few times.

To Reproduce sudo ds -c up

Expected behavior Only need to do this once.

Screenshots

xxxx@server:~$ sudo ds -c up
[sudo] password for xxxx:
2019-02-09 04:52:15 [INFO]       /home/xxxx/.docker/compose/.env found.
2019-02-09 04:52:16 [INFO]       Copying .env file to /home/xxxx/.docker/config/.env.backups/.env.20190209045216
2019-02-09 04:52:16 [INFO]       Removing old .env backups.
2019-02-09 04:52:16 [INFO]       Replacing current .env file with latest template.
2019-02-09 04:52:16 [INFO]       Merging previous values into new .env file.
2019-02-09 04:52:33 [INFO]       Environment file update complete.

2019-02-09 04:52:33 [INFO]       Setting permissions for /home/xxxx/.docker
2019-02-09 04:52:33 [INFO]       Taking ownership of /home/xxxx/.docker for user 1000 and group 1000
2019-02-09 04:58:13 [INFO]       Setting file and folder permissions in /home/xxxx/.docker
2019-02-09 05:02:20 [INFO]       Setting permissions for /home/xxxx/.docker/config
2019-02-09 05:02:20 [INFO]       Taking ownership of /home/xxxx/.docker/config for user 1000 and group 1000
2019-02-09 05:02:31 [INFO]       Setting file and folder permissions in /home/xxxx/.docker/config
2019-02-09 05:02:41 [INFO]       Generating docker-compose.yml file.
2019-02-09 05:02:41 [INFO]       Required files included.
2019-02-09 05:02:41 [INFO]       Checking for enabled apps.
2019-02-09 05:02:41 [INFO]       DUCKDNS_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for DUCKDNS are included.
2019-02-09 05:02:41 [INFO]       HOMEASSISTANT_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for HOMEASSISTANT are included.
2019-02-09 05:02:41 [INFO]       LETSENCRYPT_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for LETSENCRYPT are included.
2019-02-09 05:02:41 [INFO]       OMBI_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for OMBI are included.
2019-02-09 05:02:41 [INFO]       ORGANIZR_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for ORGANIZR are included.
2019-02-09 05:02:41 [INFO]       PLEX_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for PLEX are included.
2019-02-09 05:02:41 [INFO]       PORTAINER_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for PORTAINER are included.
2019-02-09 05:02:41 [INFO]       PORTAINERAGENT_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for PORTAINERAGENT are included.
2019-02-09 05:02:41 [INFO]       RADARR_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for RADARR are included.
2019-02-09 05:02:41 [INFO]       SONARR_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for SONARR are included.
2019-02-09 05:02:41 [INFO]       UNIFI_NETWORK_MODE supports port mapping. Ports will be included.
2019-02-09 05:02:41 [INFO]       All configurations for UNIFI are included.
2019-02-09 05:02:41 [INFO]       WATCHTOWER_NETWORK_MODE is set to none.
2019-02-09 05:02:41 [INFO]       All configurations for WATCHTOWER are included.
2019-02-09 05:02:43 [INFO]       Merging docker-compose.yml complete.
2019-02-09 05:02:43 [INFO]       Creating containers for all enabled services.

2019-02-09 05:02:46 [INFO]       Setting permissions for /home/xxxx/.docker
2019-02-09 05:02:46 [INFO]       Taking ownership of /home/xxxx/.docker for user 1000 and group 1000
2019-02-09 05:03:20 [INFO]       Setting file and folder permissions in /home/xxxx/.docker
Pulling esphomeyaml (ottowinter/esphomeyaml:)...
latest: Pulling from ottowinter/esphomeyaml

....

2019-02-09 05:06:23 (Finished)

See timestamp 2019-02-09 04:52:33 and 2019-02-09 05:02:46

System (please complete the following information):

Additional context Add any other context about the problem here.

kiwijunglist commented 5 years ago

this is probably relevant too:

xxxxxx@server:~/.docker$ du -hs ./config/plex
13G     ./config/plex
xxxxxx@server:~/.docker$ du -hs ./config
17G     ./config
xxxxxx@server:~/.docker$ du -hs ./backup
70G     ./backup

my backup folder is ~/.docker/backup

nemchik commented 5 years ago

~/.docker/backup is a very dangerous place for you backups to be actually. DS may attempt to remove them during ds -u and may fail if the backups are immutable (they are by default). I recommend saving your backups outside of the ~/.docker folder.

kiwijunglist commented 5 years ago

ok ill move them

kiwijunglist commented 5 years ago

^ Thanks nemchick