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.

Text editing in a Docker container's console

Featured Replies

Hello,
Unraid the best. The way it does Docker and the fact that it has its own app store makes things user friendly. Im having a lot of fun learning various home server things.  I have a lot of various containers atm but I'm a bit ashamed to say that I never really edit configs within dockers as I would usually just edit what I can via WEBUIs and skip anything that needs more advanced editing. I've had several apps that require this though and I think its time to figure out how...

 

Big Question: How does someone edit a simple config file inside a docker container's console? (Unraid 6.11.5)

Example:

  • Unbound needs a slight adjustment in unbound.conf.
    • I would go to Docker tab.
    • Left click on the unbound docker.
    • Click Console.
    • Navigate to the unvound.conf file.
    • I would expect to be able to vi or vim or nano into this file (I would take any text editor at this point).  Cannot seem to find any default text editor. I can cat the file to see the contents, but not modify it in any obvious way.


Issue: I cant seem to find any default text editor already installed. The Docker console does not seem to have the ability to install any either. I cant get wget or apt install to work and nerdtools VIM just is flat out not working for things inside the containers. I dont see anything in the documentation https://docs.unraid.net/legacy/FAQ/console/ in regards to file editing. I also tried navigating via root terminal in the Unraid WEBUI but I am unsure how to cd into docker.img. I dont think this way is proper anyway so I'm not going to go down that rabbit hole.

 

I'm sure their is a quick normal way to do this but after a lot of googling and time I'm still unsure on how to accomplish this. 
 

You've got the right idea, but fundamentally the wrong method, assuming the container is built and installed correctly (not your install, the container author's setup).

 

All container files that need to persist with user changes should be mapped into the appdata folder, and you can edit those using mc at the regular Unraid console by navigating to /mnt/user/appdata/<container name>

 

If the file in question is NOT mapped, any changes will be gone when the container is updated, which obviously is not what you want. The reason there aren't text editors in most containers, and probably the answer to your unasked question, is that each container is kind of like a miniature virtual machine, each one has its own OS and files isolated from every other container and the host OS. The container authors typically only include what is minimally necessary for the app in question.

 

 

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.