Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker: Use --mount instead of -v for mounting docker paths

Featured Replies

Currently, I believe that unraid is using -v to mount paths in docker. This has the undesirable side effect of creating the path in the host system if it doesn't exist. So, for example, if you've use a bind mount in docker pointing to /mnt/disks/data and /mnt/disks/data does not exist, it will be created in the host system as an empty directory, leading to problems when you want to actually mount something into /mnt/disks/data.

 

Using the --mount syntax instead will not auto create paths. See https://docs.docker.com/storage/bind-mounts/ for reference.

 

Quote

Differences between -v and --mount behavior

Because the -v and --volume flags have been a part of Docker for a long time, their behavior cannot be changed. This means that there is one behavior that is different between -v and --mount.

If you use -v or --volume to bind-mount a file or directory that does not yet exist on the Docker host, -v creates the endpoint for you. It is always created as a directory.

If you use --mount to bind-mount a file or directory that does not yet exist on the Docker host, Docker does not automatically create it for you, but generates an error.

 

Damned if you do, damned if you don't.

 

Many required folders may need to be created depending upon the container - most notably, the appdata folder.

Could we get an option in the config like there is for access mode?

  • Author
21 minutes ago, Squid said:

Damned if you do, damned if you don't.

 

Many required folders may need to be created depending upon the container - most notably, the appdata folder.

 

I think unraid creating the folders when you add a new container is ok, but I don't see the use case for docker ever creating folders when you start a container (its gonna create an empty folder because the appdata folder is not mounted)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.