Firstly, pardon my ignorance. I am unfamiliar with docker syntax.
Following the good suggestions of fellow posters on this forum I have been able to get 2 containers up and running.
But they are slowly and surely increasing in size, and by giant amounts without any addition of any new data. Mere reboots expand the occupied space. It is also taking its toll on my LE startup time. It runs into 5-6 minutes after 15-20 reboots.
Someone suggested that cleaning up containers not in use might help and sure enough it does free up a lot of space.
So why am I having so many unused containers piling up after a period of time?
So there seem to be 2 possible solutions :
1. seems like I have setup something wrong to begin with which causes so many redundant images to pile up or
2. schedule the clean up command (at every reboot?)
Can someone please help with this?
[hr]
Below is how I have setup docker, in case anyone can identify some flaw
Plex, in the example below:
1. from command I type the following lines:
mkdir -p /storage/.kodi/userdata/.apps/plex
chmod -R a+rwx /storage/.kodi/userdata/.apps/plex
# docker run --net=host -d \
-p 32400:32400 \
-v /storage/.kodi/userdata/.apps/plex:/config \
-v /var/media/Data:/data \
timhaak/plex
This starts the app. But if I reboot it does not restart.
So I was told that ....
2. create a service in a folder called system.d , for instance plex.service. Contents of the service file as follows:
[Unit]
Description=plex container
Requires=service.system.docker.service
After=service.system.docker.service
[Service]
Restart=always
RestartSec=10s
TimeoutStartSec=0
ExecStartPre=-/bin/sh -c "mkdir -p /storage/.kodi/userdata/.apps/plex"
ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run --net=host -d \
-p 32400:32400 \
-v /storage/.kodi/userdata/.apps/plex:/config \
-v /var/media/Data:/data \
timhaak/plex
ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop plex
[Install]
WantedBy=multi-user.target
3. Thereafter, at console
systemctl enable plex.service
systemctl start plex.service
journalctl -u plex.service