[OUTDATED] Extended Docker configuration page


Recommended Posts

will there be an edit function added to the container portion - say if you added a container through command line or your add function that showed on the GUI then you could edit the variables and save them instead of removing then re-adding the container? was just curious if this was possible..

Link to comment
  • Replies 635
  • Created
  • Last Reply

Top Posters In This Topic

will there be an edit function added to the container portion - say if you added a container through command line or your add function that showed on the GUI then you could edit the variables and save them instead of removing then re-adding the container? was just curious if this was possible..

 

Maybe at some point, because it will require an import/export function, and that is not trivial.

Link to comment

I just installed this plugin - NICE WORK!  I really like it.

 

Which information do you think is important on the container table? Name, ID and Ports are already included in my development script.

 

I'd like to see the base used for each container (debian, phusion, etc).

 

Also, for me, the container ID is blank for all 3 of my dockers.  I don't really need to know the container ID, but if the column is there, it should have information :)

 

thanks for this!

Link to comment

So...  I'm trying to add a Container via this plugin.  I could get it to install via the command line with this:

 

docker run -d --name="nzbget" -v /mnt/cache/appdata/nzbget:/config -v /mnt/cache/appdata/nzbget/downloads:/downloads -v /etc/localtime:/etc/localtime:ro -p 6789:6789 needo/nzbget

 

How do I translate this command to proper GUI settings?  These are the settings I tried, but I got errors due to the repository not found locally:

 

Name:				nzbget
Repository:			needo/nzbget
Network type:			Bridge
Privileged:			False
Bind time:			True
Paths
Host Path:		/mnt/cache/appdata/nzbget
Container volume:	/config
Host Path:		/mnt/cache/appdata/nzbget/downloads
Container volume:	/downloads
Ports
Host port:		6789
Container port:		6789
Environment Variables
Variable Name:		/etc/localtime
Variable Value:		/etc/localtime:ro

 

I know I am parsing the command incorrectly, but I hope someone can explain what I am doing wrong.

 

Link to comment

Environment Variables

Variable Name: /etc/localtime

Variable Value: /etc/localtime:ro

 

These are wrong in my eyes

they should be under paths

 

You're right about that. In the new version of the plugin, you don't have to set this on volumes: just click in "Bind Time" and the plugin add that by itself.

 

PS: I've included some templates to begin with. More will be included soon.

 

Oh, I mentioned a new version. Well....

 

This is a major revamp in the plugin: now we can use templates to create containers easily. And that's not all: upon the creation of a new container, that configuration will be stored on the flash drive to later retrieval under the prefix my-{name}. This will dramatically improve the ability to redeploy a container.

 

Hope you all enjoy.

Link to comment

Are the templates blank when you select one?

 

I've attached my .xml file for sab to this post (I changed it from .xml to .txt so I could attach it, just change it back to .xml), then place that into the /boot/config/plugins/Docker folder.  After that, when you open the create container window you should see another template available (my-SABnzbd).  Select that template, and you should see how the boxes get filled.  Change whatever necessary from there.  Also, after creating a container with that template, all the others should not have information when you select them.  At least that's how it worked for me.

my-SABnzbd.txt

Link to comment

Is it possible to add the ability to control the order in which containers get started?

 

Would be useful for making sure that a mariadb container is started before other containers which might need to talk to it.

 

Sure, but there is no way to guarantee it will indeed launch it after the mariadb start inside it's container. It's a race condition that can't be solved this way.

 

May I suggest that you leave the container unmanaged and add something like this in the end your /boot/config/go script:

 

cat >> /usr/local/emhttp/plugins/dockerMan/event/disks_mounted << EOL

CONTAINER="container name"
IP=`ifconfig br0 | grep inet | grep -v inet6 | awk '{print $2}'`
while true; do
  out=\$(echo exit | telnet \$IP 3306 2>&1 )
  if [[ \$out =~ "closed by foreign host" ]]; then
    /usr/bin/docker start \$CONTAINER
    break;
  else
    sleep 1
  fi
done
EOL

 

Link to comment

Thanks for the suggestion.

 

I think it would be enough to ensure that the containers start in order. Mariadb doesn't take too long to start up once the container is running. Other containers that depend on it have their own initialisation delay before they try to access it.

 

Another possible addition could be a configurable delay that a user could set, per container, which delayed the startup of the next container by the specified number of seconds. Again it wouldn't guarantee the first container was fully started but would be a way of having it manageable from your plugin.

Link to comment

Thanks for the suggestion.

 

I think it would be enough to ensure that the containers start in order. Mariadb doesn't take too long to start up once the container is running. Other containers that depend on it have their own initialisation delay before they try to access it.

 

Another possible addition could be a configurable delay that a user could set, per container, which delayed the startup of the next container by the specified number of seconds. Again it wouldn't guarantee the first container was fully started but would be a way of having it manageable from your plugin.

 

For me it's too much hassle to no palpable guarantee.

Link to comment

Do I force or not the removal of images?  ???

 

even if you use the -f in docker rmi -f <imageid> then the image will not be deleted if there is still a container depending on it

believe me i tried many times before i found the docker ps -a flag

 

so i would say NO as it is of no use ....

might use PS -a though to show the containers....

 

but again people who have been messing with dockers might get a heart attack when they see all the leftover containers in the gui :P

 

Update: prompt if the user wishes to remove just the container, or the container and it's image. The "-f" modifier is now used by default on removing containers.

Link to comment

gfjardim

 

Are you going to make the plugin to be able to use other repos?

 

Big Thank You for your Hardwork!

 

JM

 

Do you mean add new templates?

 

I have this working fine but would love to be able to use your plugin to manage it.  Here is the link below as I am using the Gotham build.

 

https://registry.hub.docker.com/u/wernerb/docker-xbmc-server/

 

 

docker run -d --net=host --privileged -v /directory/with/xbmcdata:/opt/xbmc-server/portable_data wernerb/docker-xbmc-server:gotham

 

 

Thanks

Link to comment

gfjardim

 

Are you going to make the plugin to be able to use other repos?

 

Big Thank You for your Hardwork!

 

JM

 

Do you mean add new templates?

 

I have this working fine but would love to be able to use your plugin to manage it.  Here is the link below as I am using the Gotham build.

 

https://registry.hub.docker.com/u/wernerb/docker-xbmc-server/

 

 

docker run -d --net=host --privileged -v /directory/with/xbmcdata:/opt/xbmc-server/portable_data wernerb/docker-xbmc-server:gotham

 

 

Thanks

 

Obviously. Make a template and submit it here: http://lime-technology.com/forum/index.php?topic=34010.0

 

I'll gladly include all submitted templates. I started that topic, but no one seem to care about that, or took the initiative.  :-\

Link to comment

gfjardim

 

Are you going to make the plugin to be able to use other repos?

 

Big Thank You for your Hardwork!

 

JM

 

Do you mean add new templates?

 

I have this working fine but would love to be able to use your plugin to manage it.  Here is the link below as I am using the Gotham build.

 

https://registry.hub.docker.com/u/wernerb/docker-xbmc-server/

 

 

docker run -d --net=host --privileged -v /directory/with/xbmcdata:/opt/xbmc-server/portable_data wernerb/docker-xbmc-server:gotham

 

 

Thanks

 

Obviously. Make a template and submit it here: http://lime-technology.com/forum/index.php?topic=34010.0

 

I'll gladly include all submitted templates. I started that topic, but no one seem to care about that, or take the initiative.  :-\

 

I understand.  I like what you have going here and hopefully others will too. I will study your templates some more.

 

Thanks

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.