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.

How to add a volume mapping from an environment var

Featured Replies

Hey Guys,

 

I have a bunch of bashscripts/libraries (at /mnt/user/appdata/scripts/bshlib/) that I want to map to a container folder (eg /root/bshlib) but I want this path to variable so I already tinkered that the go script to export BASHLIB=/mnt/user/appdata/scripts/bshlib

I also added in the advanced section of the docker startup to following: -v "${BASHLIB}":"/root/bshlib".

But when I apply it the docker fails to see the environment variable

 

  -v '/mnt/user/appdata/mariadb':'/config':'rw'
  -v "${BASHLIB}":"/root/bshlib"

  docker: invalid spec: :/root/bshlib: empty section between colons.

 

Yes I have rebooted unraid and yes the variable is present when I login (as root):

 

  # env | grep BASH
  BASHLIB=/mnt/user/appdata/scripts/bshlib

 

When I execute the statement that is in de "Command execution" box is runs fine so.. I think when the docker manager executes the command it has no knowledge of the BASHLIB variable. The variable is exported in de go script and for testing I also added is to /root/.bash_profile (using the go script so it's there after a reboot". I'm planning on using this a lot so if I want (or need) to change the path I don't want to go over all the containers.

 

Regards

  • Community Expert

docker templates are in /boot/config/plugins/dockerMan/templates-user

  • Author

That was not the question 🙂

  • Community Expert

Just suggesting an alternative approach

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.