Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run with other User:Group #3

Open
nevrion opened this issue Jan 28, 2022 · 2 comments
Open

Run with other User:Group #3

nevrion opened this issue Jan 28, 2022 · 2 comments

Comments

@nevrion
Copy link

nevrion commented Jan 28, 2022

hello, first of all thank you very much for the container.

I would like to note that it might be helpful to note in the readme for a bit confused people like me that ffmpeg needs to be installed on the host or alternatively include it in the container.

But now to my little problem. I'm not really well versed in Docker containers. I would like to run the container as a user other than root. I tried to specify another user in the docker-compose file, but then access rights are missing within the container. Does anyone have an idea for me?

@9Mad-Max5
Copy link
Owner

Hi,

Thanks for the positive feedback.

Are you sure you need to install ffmpeg in the host system?
Usually, the container environment can't access the host applications.
I compiled ffmpeg as described for the m4b-tool during the build process.
I have ffmpeg installed on the host machine, which maybe leads to the issue I can't recognize the issue, but I'm really confused regarding this problem.

As mentioned above and readable in the dockerfile I'm using a baseimage where on top I compile and build ffmpeg.
For this reason, it is quite large for a headless one.
I guess changing USER:GROUP will lead to complete malfunction, as the packages are installed under root.

I would recommend keeping it with root as the container has a rather limited connection to your host in my opinion.
You should just share the original, backup, temp (working directory) and config where your yaml and all this stuff is kept.

@nevrion
Copy link
Author

nevrion commented Jan 28, 2022

First of all, I use google translate because my english is really bad, I hope this doesn't necessarily mean something is lost

Yes I'm pretty sure. First I installed the container without FFMPEG on the host and after the container copied the files to the original in the temp folder nothing happened and auto-m4b-tool.log looked like this over and over again:

/auto-m4b-tool.sh: line 31: parts: bad array subscript
mv: cannot stat '': No such file or directory
find: ‘/original/’: No such file or directory
mv: cannot stat '/temp/mp3merge/supervise': No such file or directory
mv: cannot stat '/temp/untagged/supervise.chapters.txt': No such file or directory
cp: cannot stat '/original/
': No such file or directory

The container log file itself repeats the following over and over again:

The folder supervise will be merged to /temp/untagged/supervise.m4b
Starting Conversion
Finished Converting
Deleting duplicate mp3 audiobook folder
Read the mp3 files for movement.
Making a backup of the whole input/original folder.
Moving to merge it.
Moving all the m4b books to untagged.
supervise/
Folder Detected

If I now installed ffmpeg on the host it looks like this:

*** Booting runit daemon...
*** Runit started as PID 22
Read the mp3 files for movement.
Making a backup of the whole input/original folder.
Moving to merge it.
Moving all the m4b books to untagged.
Jan 28 22:37:32 770111a03c89 cron[26]: (CRON) INFO (pidfile fd = 3)
Jan 28 22:37:32 770111a03c89 cron[26]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Test Audiobook Author - Test Audibook Title/
Folder Detected
Sampling ./047 - Test!_, Teil 1.mp3
Bitrate = 136543
The folder Test Audiobook Author - Test Audibook Title will be merged to /temp/untagged/Test Audiobook Author - Test Audibook Title.m4b
Starting Conversion
n 28 22:39:01 770111a03c89 CRON[75]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)

and all works fine

Edit:

As I said, I don't really know anything about Docker and I still have to read up on it, is it probably because line 8 in your Dockerfile is commented out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants