Docker Template XML Schema


Recommended Posts

  • 3 weeks later...

Possible stupid question incoming....

 

Is it possible to create an empty Docker template. 

The user can then add variables, paths and the dockerhub info in the GUI (assuming you pull the update from dockerhub and not github?) 


This would be handy for:

1. Testing Docker images that arent in the CA

2. Docker images maintained by someone who doesnt want to build the Unraid App and still benefit from the update mechanics (and Unraid-API)

Link to comment
1 minute ago, Squid said:

Just hit Add Container from the Docker Tab.  Nothing says you have to select anything from the drop down

Thanks for the quick response - that was exactly what i was looking for. I've been asking as many folks to create unraid templates where possible, but sometimes it doesnt make sense for them.

Thanks for maintaining the CA - its a real game changer for Unraid! 

Link to comment
On 12/2/2020 at 2:28 AM, Squid said:

Developer / Maintainer Profiles

 

CA revisions due Decemeber 2020 support developer profiles.  This allows a user to look at and compare the developers who are creating / supporting the various containers / plugins.  In order to take advantage of this, create a file within your template repositories called ca_profile.xml

 

For most developers, the profile would be something akin to:

 


<?xml version="1.0" encoding="utf-8"?>
<Maintainer>
  <Icon>https://raw.githubusercontent.com/ich777/docker-templates/master/ich777/images/avatar.jpg</Icon>
  <Profile>
    Creating Docker containers with a little different approach than most developers, the container only has the dependencies installed and also the start script and downloads the application itself on the first start and updates the application on every start/restart of the container.
  </Profile>
  <DonateLink>https://www.paypal.me/chips777</DonateLink>
  <DonateText>If you like my work please consider Donating.</DonateText>
</Maintainer>

image.png.27dadafb74af3ee25e5b455d2b8706fe.png

 

 

However there are also other entries which can be utilized if so desired:

 

<Forum> - A link to a forum page here (announcement thread, general support thread etc)

<WebPage> - A link to a webpage you operate

<Facebook> - A link to a facebook group / page 

<Reddit> - A link to a reddit group

<Discord> - A link to a discord site

<Twitter> - A link to a twitter page

 

image.png.9c0ba15b94335ef6672a12e2aa46324b.png

 

Whenever a user happens to look at the repositories that are present in any given search result, the ones which have the profile filled out are displayed first in the list.

What should we know about the Icon tag? What image formats are supported, is transparency supported, what are the minimum and maximum dimensions, optimal file size, optimal ratio, etc?

Link to comment
On 12/2/2020 at 11:28 AM, Squid said:

Developer / Maintainer Profiles

 

CA revisions due Decemeber 2020 support developer profiles.  This allows a user to look at and compare the developers who are creating / supporting the various containers / plugins.  In order to take advantage of this, create a file within your template repositories called ca_profile.xml

 

For most developers, the profile would be something akin to:

 


<?xml version="1.0" encoding="utf-8"?>
<Maintainer>
  <Icon>https://raw.githubusercontent.com/ich777/docker-templates/master/ich777/images/avatar.jpg</Icon>
  <Profile>
    Creating Docker containers with a little different approach than most developers, the container only has the dependencies installed and also the start script and downloads the application itself on the first start and updates the application on every start/restart of the container.
  </Profile>
  <DonateLink>https://www.paypal.me/chips777</DonateLink>
  <DonateText>If you like my work please consider Donating.</DonateText>
</Maintainer>

image.png.27dadafb74af3ee25e5b455d2b8706fe.png

 

 

However there are also other entries which can be utilized if so desired:

 

<Forum> - A link to a forum page here (announcement thread, general support thread etc)

<WebPage> - A link to a webpage you operate

<Facebook> - A link to a facebook group / page 

<Reddit> - A link to a reddit group

<Discord> - A link to a discord site

<Twitter> - A link to a twitter page

 

image.png.9c0ba15b94335ef6672a12e2aa46324b.png

 

Whenever a user happens to look at the repositories that are present in any given search result, the ones which have the profile filled out are displayed first in the list.

 

I do like this.

 

Did I set this up right?

 

https://github.com/rix1337/docker-templates/blob/master/rix1337/ca_profile.xml

Link to comment

Hi,

I'm quite new to Unraid and trying to get in touch with Unraids Docker XML templates.

 

I created a simple Github repo. Then created a XML template using the "Template Authoring Mode" in Unraid and pushed the file to the repo. 

After all i added my repo to the "Template repositories:" Section in the Docker tab.

When I'm now trying to add a new container there is no template displayed in the dropdown menu. :(

I tested with some other repos like https://github.com/juusujanar/unraid-templates which worked well. 

Im quite not sure what else is needed to make my repo/ XML file valid. Did I miss something? 

Thanks in advance.

 

Regards, 

André

 

Link to comment
4 hours ago, andre (buanet) said:

useful to place this as an issue.

It's already a known issue, and relatively minor since the usage of "Template Repositories" is rare (due to CA), and easy work arounds -> either switch to master branch or place the xmls on the flash drive.

Link to comment
  • 4 weeks later...

Next release of CA supports a new entry on the xml templates

<ExtraSearchTerms>text</ExtraSearchTerms>

 

These are extra search terms (separated by a space) for which you want your app to be able to be searched by.  These terms will appear in the auto complete entries.

 

Note that auto complete entries are already composed of:

  • The repository
  • The name of the app
  • The author of the app (plugins only)
  • Categories (both in English and Translated)

Searches are done by name of app, repository, descriptions/overviews and categories

 

The extra search terms allows you to have the app searchable by any addition terms you might want that don't really fit into any of the above.

 

eg: on User Scripts I've added in

<ExtraSearchTerms>cron crontab schedule</ExtraSearchTerms>

 

Link to comment
  • 3 weeks later...

Hello, I found a docker for a clever UI to control LFTp. However it’s not directly unraid ready.

I’ve tried just installing it but getting some errors and would like to figure this out and just create an xml file for it so it can work more readily (and others can benefit).

There’s gotta be an updated How To guide somewhere? This is the most relevant thing I found but it’s several years old and not sure if it’s accurate still

Link to comment

Donation links within templates are now deprecated.  In other words, all an author / maintainer has to do is fill out the appropriate entries within their profile ( https://forums.unraid.net/topic/38619-docker-template-xml-schema/page/3/?tab=comments#comment-919111

 

If (for some reason) you desire a different donation link on a specific template, then just add the appropriate entries to that template, and it will take precedence over the profile one.

 

You do NOT have to adjust any of your existing templates to handle this change.  Any / all existing donation links whether or not you have filled out a profile will still work.

 

 

Link to comment
  • 3 weeks later...

Just a reminder that html tags (or anything that might get interpreted as an HTML tag - ie: don't bracket things in < and > or &lt; and &gt;) is explicitly banned from any element or attribute within the xml due to security concerns.  They are still allowed for the time being within Overviews, but this is in the process of being deprecated soon in favour of markdown formatting.

 

Any template with tags anywhere except within the Overview gets immediately blacklisted, and as a precautionary measure the entire repository the template was contained within also gets blacklisted pending an investigation.

  • Haha 1
Link to comment
  • 2 months later...

Starting with the next revision of Unraid (6.10), all html tags within descriptions / overviews / config elements etc is automatically removed by the OS.  This includes any thing that can be construed as a tag (ie: "change this entry with <variable> [variable2] here" - <variable> & [variable2] will be removed from the description).

 

Since 6.9, the edit docker screens have supported Markdown on the descriptions / overviews.  (Currently there are no plans to have the config elements support this - and the application feed will still trigger a very nasty blacklisting if it finds any tagging within config elements)  The next revision of CA will also support Markdown within the popup descriptions.  See here for a live demo of the version of markdown which is incorporated into the GUI

 

For the most part this security change will not affect anyone.  Some old templates that did include some colors within the descriptions will have the colors removed (Markdown does not support colors).

 

Because Markdown is human readable, if you do create a template overview using markdown, there will be no issues on a user installing that template on a system <6.9.0

Link to comment
  • 1 month later...

If your application requires something specific on the user's system (eg: IPMI compatible motherboard, ElasticSearch, mySQL, etc) then you can specify this within the template (for either a docker container or a plugin) by adding in

<Requires>ElasticSearch</Requires>

 

(This can also be filled out on the edit template screen - Additional Requirements)

 

This adds a note to the popup showing the text you specify.  It is not a check against the hardware or software which the user has installed

 

This entry also supports Markdown.

<Requires>
**Nvidia Driver plugin** (nVidia Support) *or*
**Intel GPU TOP plugin** (Intel Support) *or*
**AMD Driver** and **RadeonTop plugins** (AMD Support)
</Requires>

 

Results in

image.png.cde18d2fa67b3176d18685539f62fe68.png

Link to comment
  • 4 weeks later...

EDIT: AS OF 8/14/21, any all v1 entries are automatically removed from v2 templates in the appfeed

 

Within the next week or so, all v1 template entries will be automatically removed from v2 templates.  IE: <Environment>, <Data> and <Publish> will be removed

 

IE: If you're manually editing a template and adding in another variable via the 

<Environment>
  <Variable>
    .
    .
  </Variable>
</Environment>
  

Without adding the corresponding <Config> entry, your changes won't take effect.

 

This pretty much only affects anyone who manually builds templates without using dockerMan to do it for them.

 

Note that for backwards compatibility, dockerMan will still always save the v1 entries.  Just the appfeed and what CA passes back to dockerMan for install will now be strictly v2

 

Any templates which are not v2 (lacking the <Config> entries) will be unaffected.

Link to comment
  • Squid pinned this topic

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.