linuxserver / docker-airsonic

GNU General Public License v3.0
37 stars 8 forks source link

Optional /media mount still creates unused volume #32

Closed Forceflow closed 3 years ago

Forceflow commented 4 years ago

Note: Pretty new to docker in general, so this might be a dud. My apologies if it's the case, and thank you for your hard work.

The /media mount is listed as optional in the provided docker run command (relevant excerpt:).

-v </path/to/other media>:/media `#optional` \

If i do not specify it, I don't expect a docker-managed volume to be created for it, but there is. It's 0 kb and remains unused, so it's not a big issue.

If you update your container often (by stopping, removing the old one, and creating a new one, like the instructions say), you soon end up with a graveyard of unused 0kb volumes :) docker image prune -a solves the "issue".

Expected Behavior

No docker-managed volumes are (auto)created.

Current Behavior

A docker-managed volume is created.

Steps to Reproduce

  1. Create a container using the provided create example, but leave out the line marked optional about /media
  2. observe docker volume ls

Environment

OS: Ubuntu 20.04 CPU architecture: x86_64
How docker service was installed: From Ubuntu repositories, version 19.03.8, build afacb8b7f0

Command used to create docker container (run/create/compose/screenshot)

docker create \
  --name=airsonic \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 4040:4040 \
  -v /home/jeroen/docker/airsonic/config:/config \
  -v /home/jeroen/docker/airsonic/playlists:/playlists \
  -v /home/jeroen/docker/airsonic/podcasts:/podcasts \
  -v /media/DATA/music:/music \
  --restart unless-stopped \
  linuxserver/airsonic
tobbenb commented 4 years ago

We know about it and we are removing everything except the needed volumes, but do so only when we do other fixes or updates to a container. So eventually it will be removed.

Forceflow commented 4 years ago

Okay - I currently remedy the behaviour by mountin my own empty folder on /media :)

Thanks!

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.