[docker] Command Line Flag to Store XAttrs in File

Support for Ubuntu and other Desktop Linux distributions
Post Reply
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

[docker] Command Line Flag to Store XAttrs in File

Post by HarryMuscle »

I'm running the jlesage FileBot Docker container which only allows adding command line flags when running the AMC script automatically and I need to tell it to use a file to store the extended attributes. I know there's a command line flag to disable storing extended attributes (-no-xattr), but I can't find one for telling the script to store them in a file. All options that I found to tell FileBot to use a file to store extended attributes seem to involve a separate call to configure FileBot ahead of time, which unfortunately isn't possible with the Docker container.

Thanks,
Harry
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Command Line Flag to Store XAttrs in File

Post by rednoah »

:arrow: You can use the filebot command the generate the necessary configuration file in the appropriate location:

Code: Select all

filebot -script fn:properties --def net.filebot.xattr.store=.xattr
:idea: The "appropriate location" would the the persistent data folder (i.e. docker mapped volume) where FileBot stores all its application data files, caches, license information, etc. You can create and modify this file manually. But you'll want to use filebot -script fn:properties the first time around, so that filebot itself can do it for you, and thus teach you the file location, file format, etc as it does so.



HarryMuscle wrote: 31 Jan 2022, 19:42 All options that I found to tell FileBot to use a file to store extended attributes seem to involve a separate call to configure FileBot ahead of time, which unfortunately isn't possible with the Docker container.
:?: What lead you to believe that? You can do docker exec -it <mycontainer> bash to run a shell inside your container and then run arbitrary commands:
https://stackoverflow.com/a/30173220


e.g.

Code: Select all

$ docker run -it --entrypoint bash jlesage/filebot
bash-4.4# /opt/filebot/filebot -script fn:properties --def net.filebot.xattr.store=.xattr
Update user-defined System Properties
* Set net.filebot.xattr.store = .xattr
Store user-defined System Properties
* Write /config/system.properties
#FileBot System Properties
#Tue Feb 01 02:33:15 GMT 2022
net.filebot.xattr.store=.xattr
:arrow: Write net.filebot.xattr.store=.xattr to your /config/system.properties FileBot configuration file. The /config folder inside the docker is normally mapped to some folder on your host via your -v mappings.
:idea: Please read the FAQ and How to Request Help.
HarryMuscle
Posts: 34
Joined: 06 Jan 2022, 22:40

Re: Command Line Flag to Store XAttrs in File

Post by HarryMuscle »

rednoah wrote: 01 Feb 2022, 02:08 :arrow: You can use the filebot command the generate the necessary configuration file in the appropriate location:

Code: Select all

filebot -script fn:properties --def net.filebot.xattr.store=.xattr
:idea: The "appropriate location" would the the persistent data folder (i.e. docker mapped volume) where FileBot stores all its application data files, caches, license information, etc. You can create and modify this file manually. But you'll want to use filebot -script fn:properties the first time around, so that filebot itself can do it for you, and thus teach you the file location, file format, etc as it does so.



HarryMuscle wrote: 31 Jan 2022, 19:42 All options that I found to tell FileBot to use a file to store extended attributes seem to involve a separate call to configure FileBot ahead of time, which unfortunately isn't possible with the Docker container.
:?: What lead you to believe that? You can do docker exec -it <mycontainer> bash to run a shell inside your container and then run arbitrary commands:
https://stackoverflow.com/a/30173220


e.g.

Code: Select all

$ docker run -it --entrypoint bash jlesage/filebot
bash-4.4# /opt/filebot/filebot -script fn:properties --def net.filebot.xattr.store=.xattr
Update user-defined System Properties
* Set net.filebot.xattr.store = .xattr
Store user-defined System Properties
* Write /config/system.properties
#FileBot System Properties
#Tue Feb 01 02:33:15 GMT 2022
net.filebot.xattr.store=.xattr
:arrow: Write net.filebot.xattr.store=.xattr to your /config/system.properties FileBot configuration file. The /config folder inside the docker is normally mapped to some folder on your host via your -v mappings.
Perfect, that will work.

Thanks,
Harry
Post Reply