Docker FAQ feedback


Recommended Posts

7 hours ago, tmchow said:

I have several containers running that I want to execute with “--restart unless-stopped” option. How do I do this? When I go to edit a docker container I don’t see a place to add custom command line options. 

Extra Parameters (Advanced View)

Link to comment
  • 6 months later...
  • trurl pinned this topic
  • 5 months later...
  • 1 month later...
On 6/2/2017 at 4:46 PM, Squid said:

How do I limit the memory usage of a docker application?

To limit the memory usage of a particular app, add this to the extra parameters section of the app when you edit / add it:


--memory=4G

This will limit the memory of the application to a maximum of 4G

 

So, ah, like this?

image.png.b8ba0a713bbcb748a86a2de4519b751f.png

 

Or am I missing something? Wouldn't be the first time.

Link to comment
  • 1 month later...

I recently went through some difficulty with my Plex docker and permission rights for files.  It took a week of back and forth on two sections of the forums before I had the answer.  In the end it was a simple fix but it seems like very few know its there or can be an issue.  I would assume this could potentially affect or be useful in other dockers as well.

 

--Issue--  

I use the Plex DVR with the Linuxserver.IO Plex docker.  The video files being created by the Plex DVR were being created with limited access rights for anyone but the user "nobody" the owner of the file.  I could not move, rename, delete any files without first running the "new permissions" utility on unRaid.

 

--Cause--

linux has a UMASK default of 022, but this is not compatible with the unraid system.  This limits user access to the user/group that created the folder and/or file, in this case "nobody."   UMASK of 0000 will mean that all files / folders will be r/w access for all users with the appropriate permissions in unRAID.

 

--Fix--

The Plexserver.IO docker has a variable for UMASK that isn't in the default list when first installed.  You can add in the docker settings UMASK_SET, and you then assign 0000 there.  This resolved the access rights issues to the DVR created files.

 

If this is helpful to others, certainly can be added to any FAQ

 

  • Like 1
Link to comment
  • 1 month later...

So I've been trying to install a second Docker instance the way you described it in the FAQ:

On 8/20/2017 at 2:38 AM, Squid said:

How do I install a second instance of an applications?

 

There may be some use cases where you may wish to run a given application twice, with separate appdata settings, ports, etc.

 

Assuming that the container runs as network type: Bridge,

 

  • On the Apps Tab (you do have Community Applications installed don't you?),
  • Go to the Installed Apps section,
  • Reinstall using default values the application you want to run another instance for
  • Change the name of the application, along with assigning it different ports, paths (you may need to show advanced settings to see the appdata (/config) path)
  • Hit Apply

 

If the application runs as network type: Host, you will do all the same as above, but you will need to switch network type to be Bridge, and add in all of the applicable ports and reassign them as needed.  (ie: check with the support thread and/or the project URL to determine which ports need to be defined

 

 

Alternatively, (under either Bridge or Host network types), if you are running unRaid 6.4+, then you can also assign the new instance a different IP address and keep the ports the same (bridge mode), or not define them at all (host mode).  But you will still have change the name of the application and set the appdata (/config folder) accordingly

 

The thing is if I go to the already installed container, there is no "reinstall using default values". I can only "edit". When I edit, even though I changed name, ports, config location, and so on it just deletes the already installed docker files and installs them at the newly specified location.
What am I doing wrong?

Edited by Heciruam
Link to comment
  • 2 weeks later...
  • 2 months later...
On 5/26/2017 at 11:15 PM, Squid said:

My docker.img file is filling up due to excessive logging from various apps

 

Some applications will log almost everything that they do.  In cases of your docker.img file filling up due to excessive logging, you should look at the application's settings within its GUI and try to limit the logging that it performs.

 

Additionally, you can limit any docker's logging to a set size by adding the following to the Extra Parameters when you edit the application template (Switch to advanced view via the button in the top right corner)

 


--log-opt max-size=50m --log-opt max-file=1

This will limit the log size to a very reasonable 50 Meg

 

EDIT: DO NOT USE THE LOG ROTATION OPTION IN UNRAID LISTED BELOW.  IT IS NOT OBVIOUS THE STEPS REQUIRED TO MAKE IT WORK PROPERLY  For the log rotation settings to take effect, you MUST remove and reinstall your containers (or delete the docker image).  It is advised to instead use the extra parameters section instead

 

* Under unRaid 6.7.0+, the logging options now insert the appropriate entries into the entra parameters, but you still basically have to remove and then re-add the container

 

EDIT:  As of unRaid 6.4.0-rc7 you can set this globally for all applications by:

 

  1. Settings - Docker
  2. Stop the service
  3. Switch to advanced view
  4. Enable the logging rotation option accordingly
  5. Restart the service

 

 

 

Works great for me on 6.6.7 unraid, fixed my sonar and ombi and transmission spamming gigabytes of logs.

Link to comment
  • 3 years later...
On 5/26/2017 at 8:56 AM, Squid said:

 

How do I move or recreate docker.img?

 

The easy way to move or recreate docker.img -
1 Go to Settings -> Docker -> Enable Docker, and set to No, then click the Apply button  (this disables Docker support)
2 If recreating your docker.img file, then switch to Advanced View, then check off the box and press Delete, then skip to step 5

3 Using mc or any file manager or the command line, move docker.img to the desired location (/mnt/cache/docker.img is recommended)
4 In Settings -> Docker, change the path for Docker image to the exact location you just copied to
5 Now set Enable Docker back to Yes, and click the Apply button again  (re-enabling Docker support)

 

NOTE: If you have created any custom docker networks (eg through docker network create) you will need to recreate them after recreating your image and before reinstalling your applications


The standard way to move or recreate docker.img is to stop Docker support, delete the current image, re-enable Docker support

 

The easiest way to reinstall your applications would be to go to the Apps Tab, Previous Apps Section.  Then check off all of your previous applications and hit "Install"

Regarding your point about re-installing from the templates in Previous Apps, what do you do if the previous apps doesn't have all the docker containers? For reference, I checked previous apps before attempting to shrink my docker image and noticed that it does not contain any of my current templates for the 20+ containers I have in the Docker tab.

Link to comment
1 hour ago, KluthR said:

I never used Previous Apps before. I always (if needed) restore my xml templates and (mainly): Add Container -> Choose template -> Save.

 

Done

Previous Apps is much easier than that, and you can do multiple dockers. Just select them, no need to even know about the templates that allow them to be selected.

Link to comment
2 hours ago, NichollsGlen said:

what do you do if the previous apps doesn't have all the docker containers?

It's also possible to "install" containers from the command line, and so no template would be created since the templates come from the webUI Add/Edit Container page. There are many ways the webUI can't manage a container created at the command line since there is no template for it to work with.

Link to comment
5 hours ago, trurl said:

Your docker templates are on your flash drive in config/plugins/dockerMan/templates-user (assuming you haven't wiped them in some way).

Okay perfect, I see those now. Thanks for the tip!

 

5 hours ago, trurl said:

It's also possible to "install" containers from the command line, and so no template would be created since the templates come from the webUI Add/Edit Container page. There are many ways the webUI can't manage a container created at the command line since there is no template for it to work with.

Hmmm, so I still don't see most of the templates in Previous Apps that I installed through CA. I see all of my templates (phew) in /boot/config/plugins/dockerMan/templates-user/ , but only a couple of them show up in Apps > Previous Apps... All of them are in Installed Apps but it'd be nice to see them in Previous Apps so I can set all of them up at the same time. Is there a way to import the XML in the Previous Apps or something so they show up there?

Edited by NichollsGlen
clarity
Link to comment
  • 3 weeks later...
  • 7 months later...

Is there a way to mitigate breaking changes and/or major versions in a CA template?

One app I manage a template for has a new major (x.y.z) version out, which requires changes to both the Docker/CA settings (some new config fields, some removed, some changed type from a string to a dropdown option) and to non-Docker settings (permission changes to the remote API the app interacts with via the provider's portal).

1. Is there a process that I can take to properly migrate user settings from the old "string" type to the new "dropdown" type? If not, is there a way to call this out to the user or force them to view the app's configuration page during an update?
2. In the same vain, is there a way to stop users from auto-updating to a new major version, or bring attention to it?

It doesn't seem like there's necessarily versioning for CA templates. The container currently uses `Branch` for which Docker image to use, but with `latest` being the only option. Perhaps changing the only available branch to a specific older image?

Edited by grtgbln
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.