Jump to content

Docker


Luke

Recommended Posts

thefirstofthe300

@@elboletaire

 

Hurricane has been doing some work on the Docker images so that is why the image is failing.  He is in the process of pushing some changes to docker so these issues should be sorted out in the next couple of days.  The beta and dev images are both building correctly so I have faith that he will get stable fixed soon.

Link to comment
Share on other sites

EdgarWallace

I'm assuming your talking about the "/opt" directory? Or exactly what are you referring to?

 

Sent from my D6603 using Tapatalk

 

No, there is a share that I haven't defined: /mnt/user/user/Movies/Emby/metadata/views/c144aa8e9d21cb4ecc29419812a5133b

 

The two files attached are in that share - nothing else. I will try deleting it - let's see it it's coming back. These files have been created around late October 2015.

Link to comment
Share on other sites

hurricanehrndz

No, there is a share that I haven't defined: /mnt/user/user/Movies/Emby/metadata/views/c144aa8e9d21cb4ecc29419812a5133b

 

The two files attached are in that share - nothing else. I will try deleting it - let's see it it's coming back. These files have been created around late October 2015.

This is not a docker specific question. I just checked my movies folder and that metadata folder does not exist. I believe this might have something to do with how you have emby configured. 

Link to comment
Share on other sites

gstuartj

Working on updating to the new format. I think it should be noted that you need sudo installed and configured. My server has previously been running on a minimal Debian 8 install (which doesn't include sudo) and the install/run procedures in the wiki fail.

Link to comment
Share on other sites

hurricanehrndz

Working on updating to the new format. I think it should be noted that you need sudo installed and configured. My server has previously been running on a minimal Debian 8 install (which doesn't include sudo) and the install/run procedures in the wiki fail.

Can you be more specific.

Link to comment
Share on other sites

gstuartj

Can you be more specific.

 

Sure. I wasn't gathering data at the time, but I've recreated the terminal session. It looks like the errors originate in the emby-server script.

root@crane:~# docker run -it --rm -v /usr/local/bin:/target -e "APP_USER=nobody" \
>     emby/embyserver instl
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-conf-onetime: executing... 
[cont-init.d] 01-conf-onetime: exited 0.
[cont-init.d] 02-user-onetime: executing... 
[cont-init.d] 02-user-onetime: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Installing emby-server...
Updating user to nobody...
instl exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
root@crane:~# docker run -it --rm -v /etc/systemd/system:/target \
>    emby/embyserver instl service
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-conf-onetime: executing... 
[cont-init.d] 01-conf-onetime: exited 0.
[cont-init.d] 02-user-onetime: executing... 
[cont-init.d] 02-user-onetime: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Installing emby-server Service...
Please run: sudo systemctl daemon-reload
To start run: sudo systemctl start emby-server
instl exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
root@crane:~# emby-server 
Cleaning up stopped emby-server instances...
/usr/local/bin/emby-server: line 32: sudo: command not found
We could not find existing settings for your media files.
Pleae enter the parent directories of your media files, one entry per line.
Enter "done" when finished
/media/monolith/Media
done
Starting emby-server...
/usr/local/bin/emby-server: line 114: sudo: command not found
root@crane:~# emby-server 
Cleaning up stopped emby-server instances...
/usr/local/bin/emby-server: line 32: sudo: command not found
Starting emby-server...
/usr/local/bin/emby-server: line 114: sudo: command not found
root@crane:~# systemctl status emby-server.service
● emby-server.service - Emby Media Server
   Loaded: loaded (/etc/systemd/system/emby-server.service; disabled)
   Active: failed (Result: exit-code) since Tue 2016-01-19 14:50:52 EST; 18min ago
  Process: 1924 ExecStart=/usr/local/bin/emby-server (code=exited, status=127)
  Process: 1881 ExecStartPre=/usr/bin/docker pull emby/embyserver:latest (code=exited, status=0/SUCCESS)

Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 32...d
Jan 19 14:50:52 crane emby-server[1924]: We could not find existing settings....
Jan 19 14:50:52 crane emby-server[1924]: Pleae enter the parent directories ....
Jan 19 14:50:52 crane emby-server[1924]: Enter "done" when finished
Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 64...y
Jan 19 14:50:52 crane emby-server[1924]: Starting emby-server...
Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 11...d
Jan 19 14:50:52 crane systemd[1]: emby-server.service: control process exit...27
Jan 19 14:50:52 crane systemd[1]: Failed to start Emby Media Server.
Jan 19 14:50:52 crane systemd[1]: Unit emby-server.service entered failed state.

Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Hint: Some lines were ellipsized, use -l to show in full.
root@crane:~# systemctl status emby-server.service
● emby-server.service - Emby Media Server
   Loaded: loaded (/etc/systemd/system/emby-server.service; disabled)
   Active: failed (Result: exit-code) since Tue 2016-01-19 14:50:52 EST; 24min ago
  Process: 1924 ExecStart=/usr/local/bin/emby-server (code=exited, status=127)
  Process: 1881 ExecStartPre=/usr/bin/docker pull emby/embyserver:latest (code=exited, status=0/SUCCESS)

Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 32: sudo: command not found
Jan 19 14:50:52 crane emby-server[1924]: We could not find existing settings for your media files.
Jan 19 14:50:52 crane emby-server[1924]: Pleae enter the parent directories of your media files, one entry per line.
Jan 19 14:50:52 crane emby-server[1924]: Enter "done" when finished
Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 64: /home/username/.emby-server/.embydockervolumes: No such file or directory
Jan 19 14:50:52 crane emby-server[1924]: Starting emby-server...
Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 114: sudo: command not found
Jan 19 14:50:52 crane systemd[1]: emby-server.service: control process exited, code=exited status=127
Jan 19 14:50:52 crane systemd[1]: Failed to start Emby Media Server.
Jan 19 14:50:52 crane systemd[1]: Unit emby-server.service entered failed state.

Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
b
root@crane:~# docker -v
Docker version 1.6.2, build 7c8fca2
root@crane:~# uname -a
Linux crane 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
root@crane:~# 

Edited by gstuartj
Link to comment
Share on other sites

hurricanehrndz

 

Sure. I wasn't gathering data at the time, but I've recreated the terminal session. It looks like the errors originate in the emby-server script.

root@crane:~# docker run -it --rm -v /usr/local/bin:/target -e "APP_USER=nobody" \
>     emby/embyserver instl
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-conf-onetime: executing... 
[cont-init.d] 01-conf-onetime: exited 0.
[cont-init.d] 02-user-onetime: executing... 
[cont-init.d] 02-user-onetime: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Installing emby-server...
Updating user to nobody...
instl exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
root@crane:~# docker run -it --rm -v /etc/systemd/system:/target \
>    emby/embyserver instl service
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-conf-onetime: executing... 
[cont-init.d] 01-conf-onetime: exited 0.
[cont-init.d] 02-user-onetime: executing... 
[cont-init.d] 02-user-onetime: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Installing emby-server Service...
Please run: sudo systemctl daemon-reload
To start run: sudo systemctl start emby-server
instl exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
root@crane:~# emby-server 
Cleaning up stopped emby-server instances...
/usr/local/bin/emby-server: line 32: sudo: command not found
We could not find existing settings for your media files.
Pleae enter the parent directories of your media files, one entry per line.
Enter "done" when finished
/media/monolith/Media
done
Starting emby-server...
/usr/local/bin/emby-server: line 114: sudo: command not found
root@crane:~# emby-server 
Cleaning up stopped emby-server instances...
/usr/local/bin/emby-server: line 32: sudo: command not found
Starting emby-server...
/usr/local/bin/emby-server: line 114: sudo: command not found
root@crane:~# systemctl status emby-server.service
● emby-server.service - Emby Media Server
   Loaded: loaded (/etc/systemd/system/emby-server.service; disabled)
   Active: failed (Result: exit-code) since Tue 2016-01-19 14:50:52 EST; 18min ago
  Process: 1924 ExecStart=/usr/local/bin/emby-server (code=exited, status=127)
  Process: 1881 ExecStartPre=/usr/bin/docker pull emby/embyserver:latest (code=exited, status=0/SUCCESS)

Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 32...d
Jan 19 14:50:52 crane emby-server[1924]: We could not find existing settings....
Jan 19 14:50:52 crane emby-server[1924]: Pleae enter the parent directories ....
Jan 19 14:50:52 crane emby-server[1924]: Enter "done" when finished
Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 64...y
Jan 19 14:50:52 crane emby-server[1924]: Starting emby-server...
Jan 19 14:50:52 crane emby-server[1924]: /usr/local/bin/emby-server: line 11...d
Jan 19 14:50:52 crane systemd[1]: emby-server.service: control process exit...27
Jan 19 14:50:52 crane systemd[1]: Failed to start Emby Media Server.
Jan 19 14:50:52 crane systemd[1]: Unit emby-server.service entered failed state.

Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Hint: Some lines were ellipsized, use -l to show in full.
root@crane:~#

So sudo is not required unless your user is not setup to run docker commands. 

The script first checks if your user is in the docker group if it is not in the docker group it assumes that you have no privileges to run any docker commands so it tries to elevate the permissions. Since you are installing this as nobody all the checks are against the user nobody. 

 

I would also, like to add that the install script is really for users who care to run the application as themselves or a user with some sort of home directory. "nobody" is really tough user to use. If you would really like to use nobody, that is something that is easily achievable and I can provide a fix.

 

So, in conclusion: I will be adding this to the wiki:

 

Prerequisite for running the installation script are as follows: 

* ensure APP_USER belongs to docker group

* ensure APP_USER has a valid home directory on host system

Link to comment
Share on other sites

gstuartj

 

So sudo is not required unless your user is not setup to run docker commands. 

The script first checks if your user is in the docker group if it is not in the docker group it assumes that you have no privileges to run any docker commands so it tries to elevate the permissions. Since you are installing this as nobody all the checks are against the user nobody. 

 

I would also, like to add that the install script is really for users who care to run the application as themselves or a user with some sort of home directory. "nobody" is really tough user to use. If you would really like to use nobody, that is something that is easily achievable and I can provide a fix.

 

Thanks for the explanation, if there are advantages to making sure the executing user is part of the docker group then by all means keep that requirement. I just wasn't aware of it. 'nobody' was an example user, but the user I was trying to use is also not part of the docker group.

 

I would think some admins will want to run it as a user with no home directory though, unless that has something to do with Docker best practices, which I'm not terribly familiar with yet.

Link to comment
Share on other sites

hurricanehrndz

Thanks for the explanation, if there are advantages to making sure the executing user is part of the docker group then by all means keep that requirement. I just wasn't aware of it. 'nobody' was an example user, but the user I was trying to use is also not part of the docker group.

 

I would think some admins will want to run it as a user with no home directory though, unless that has something to do with Docker best practices, which I'm not terribly familiar with yet.

Actually no there are no advantages. I will adjust the wrapper script to ensure the APP_USER is not required to belong to the docker group. In terms of the home directory that is something that might be adjustable but is very tough. I need to find a directory on linux systems that is writable by all users and I'm afraid that there is not one. I will start making the changes to fix the first issue. If you have suggestions as to where we could store the volume information the input is welcomed.

Link to comment
Share on other sites

hurricanehrndz

Did the user running the docker install command belong to the docker group? If not how is it that he or she is running the install command ?

Link to comment
Share on other sites

gstuartj

Actually no there are no advantages. I will adjust the wrapper script to ensure the APP_USER is not required to belong to the docker group. In terms of the home directory that is something that might be adjustable but is very tough. I need to find a directory on linux systems that is writable by all users and I'm afraid that there is not one. I will start making the changes to fix the first issue. If you have suggestions as to where we could store the volume information the input is welcomed.

 

Could the script assume a home directory by defualt, unless another environment variable is specified for storing the volume information/settings? Then it would be up to the user to make sure the permissions are correct. (Along with an explanation of what the permissions requirements would be.)

Link to comment
Share on other sites

gstuartj

You mean one such as /var/lib/ or /home/user ?

 

Or wherever. Now that I look at the script I see users can specify an APP_CONFIG directory. Does that remove the need for a user home directory?

Link to comment
Share on other sites

gstuartj

yes it does.

 

Okay, I see now that info was available on the wiki and I missed it in the heat of transition. Thanks.

Edited by gstuartj
Link to comment
Share on other sites

hurricanehrndz

Okay, I see now that info was available on the wiki and I missed it in the heat of transition. Thanks.

Wiki has been updated with modifications from our conversation and the new docker images are building to address your feature requests.  You might want to run this as your install command. 

docker run -it --rm -v /usr/local/bin:/target \
    -e "APP_USER=username" \
    -e "APP_CONFIG=/var/lib/emby" \
    emby/embyserver instl
  • Like 1
Link to comment
Share on other sites

thefirstofthe300

I assume that these changes mean that when I update the docker container from the old format, I should do a wipe of the old container, follow the install instructions for the new container, and simply point it at the old config?

 

If that works, man am I beginning to love Docker. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...