Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.72k stars 703 forks source link

System.UnauthorizedAccessException in version 2.36.3 and later #978

Closed koo5 closed 1 year ago

koo5 commented 1 year ago

Version

2.36.3

Flavor

CLI (Command Line Interface)

Export format

HTML, TXT, JSON, CSV

Details

2.36.2 is ok:

> docker run -v (pwd):/app/out  -it tyrrrz/discordchatexporter:2.36.2 exportguild  --guild 748871194572226661   -t $MY_DISCORD_TOKEN --format HtmlLight
Unable to find image 'tyrrrz/discordchatexporter:2.36.2' locally
2.36.2: Pulling from tyrrrz/discordchatexporter
bd159e379b3b: Already exists 
267743ec4ad4: Pull complete 
becdac357084: Pull complete 
fecdfb61533a: Pull complete 
27556f2736ee: Pull complete 
6d2097848159: Pull complete 
Digest: sha256:cbdf5fa5da13102801d652ef354b47caad0dded4828cfd4c0d8fbde54a5e8589
Status: Downloaded newer image for tyrrrz/discordchatexporter:2.36.2
========================================================================
||   Ukraine is at war! Support my country in its fight for freedom~  ||
||   Learn more on my website: https://tyrrrz.me                      ||
========================================================================

Fetching channels...
Exporting 119 channel(s)...

collab / boring desktop stream                                                                  ━━━━━━━━━━━━━━━━━━━━━━━━   0%
Text / moderator-only                                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Voice Channels / Scrum & Paperwork                                                              ━━━━━━━━━━━━━━━━━━━━━━━━   0%
Text / rules                                                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Voice Channels / General                                                                        ━━━━━━━━━━━━━━━━━━━━━━━━   0%
collab / spam                                                                                   ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
collab / frdcsa-help-wanted                                                                     ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Voice Channels / vtest                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━   0%
collab / frdcsa-project-management                                                              ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
collab / collab-tools                                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
collab / frdcsa-matchat                                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
collab / screensharing                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-social                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-general_                                                                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-wnd                                                                             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-packaging                                                                       ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-publishing-scrubbing                                                            ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-devops                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-megamath                                                                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-ai-trading                                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-webdev                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-falcon                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-semantic-desktop                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-2p0                                                                             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-datdat                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-inform7                                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
frdcsa / frdcsa-ethics                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / general                                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / libera-irc-ai                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / libera-irc-prolog                                                            ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / matrix-nars                                                                  ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-gamedev                                                               ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-story-generation                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-study-hall                                                            ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-nlu                                                                   ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-e2c                                                                   ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-emacs                                                                 ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / frdcsa-vcs                                                                   ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / prologmud_bot_testing                                                        ━━━━━━━━━━━━━━━━━━━━━━━━   0%
logicmoo project / logicmoo-project-commits                                                     ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / spammy_bot_debug_maybe_mute_this                                             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
logicmoo project / discord-relays                                                               ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-free-life-planner                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-self-discipline                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-health-planner                                                       ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-inventory-manager                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-intelligent-tutoring-system                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-longevity                                                            ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-mealplanner                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-productivity                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-preparedness                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-anti-abuse                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Free life planner / frdcsa-janitors-corner                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / fuckcars                                                                  ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-anticonsumption                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-argumentation                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-category-theory                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-cybersecurity                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-data-backup                                                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-decent-ralize                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-discord-emacs                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-eyesfree                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-grammars                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-function-graphs                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-jobs                                                               ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-irc                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-hpi                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-medicine                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-neurosymbolic                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-nonprofit                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-percy                                                              ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-picform                                                            ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-probabilistic-reasoning                                            ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-servering                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-sensor-net                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-sensor-net-ai                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-sensor-net-hw                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-study-hall1                                                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-tau                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-type-theory                                                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Frequently Inactive / frdcsa-xbrl                                                               ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Voice Channels / logicmoo-scrum                                                                 ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-hours                                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-promnesia                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-publishing                                                               ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / noirc-marketing                                                                 ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / idk-rants                                                                       ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-rdf                                                                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-tech-tree                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-koordinator                                                              ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-monetization                                                             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-sound                                                                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / legal                                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Text Channels / frdcsa-blockchain                                                               ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
misc / hydroponics                                                                              ━━━━━━━━━━━━━━━━━━━━━━━━   0%
misc / noirc-test-room-nsfw                                                                     ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
misc / frdcsa-test-room                                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
misc / frdcsa-gardening                                                                         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
misc / frdcsa-helpdesk                                                                          ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
misc / frdcsa-random-cool-ish-stuff                                                             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
misc / shameless-self-promotion                                                                 ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
#logicmoo-history / acrchived-matrix-logicmoo                                                   ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
#logicmoo-history / acrchived-logicmoo-safety-team                                              ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
#logicmoo-history / logicmoo-legalese                                                           ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
#logicmoo-history / logicmoo-nlu                                                                ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
#logicmoo-history / logicmoo-graphs                                                             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / dh-agi-irc-disabled             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / nars-irc                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / dh-nlp-irc                      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / swig-irc                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / wikidata-irc                    ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / scheme-irc-tmp-disabled         ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / dh-narrative-ai-irc             ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / dh-machinelearning-irc-disabled ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / json-ld-irc                     ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / dh-logic-irc                    ━━━━━━━━━━━━━━━━━━━━━━━━   0%
Purely IRC - (now defunct due to freenode no longer bridging) / shen-irc                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / lisp-irc                        ━━━━━━━━━━━━━━━━━━━━━━━━ 100%
Purely IRC - (now defunct due to freenode no longer bridging) / dh-philosophy-irc-disabled      ━━━━━━━━━━━━━━━━━━━━━━━━ 100%

Successfully exported 112 channel(s).

Failed to export 7 channel(s):
logicmoo project / prologmud_bot_testing: No messages found for the specified period.
misc / hydroponics: No messages found for the specified period.
Purely IRC - (now defunct due to freenode no longer bridging) / dh-logic-irc: No messages found for the specified period.
Voice Channels / vtest: No messages found for the specified period.
Voice Channels / Scrum & Paperwork: No messages found for the specified period.
collab / boring desktop stream: No messages found for the specified period.
Voice Channels / General: No messages found for the specified period.

>

Steps to reproduce

2.36.3:

> docker run -v (pwd):/app/out  -it tyrrrz/discordchatexporter:2.36.3 exportguild  --guild 748871194572226661   -t $MY_DISCORD_TOKEN --format HtmlLight
========================================================================
||   Ukraine is at war! Support my country in its fight for freedom~  ||
||   Learn more on my website: https://tyrrrz.me                      ||
========================================================================

Fetching channels...
Exporting 119 channel(s)...

collab / boring desktop stream ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0%
Text / moderator-only          ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0%

ERROR
System.UnauthorizedAccessException: Access to the path '/out/frdcsa-logicmoo-agi - Text - moderator-only [895956043992039426].html' is denied.
    System.IO.IOException: Permission denied
  at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) 
  at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) 
  at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) 
  at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) 
  at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) 
  at System.IO.File.Create(String path) 
  at DiscordChatExporter.Core.Exporting.MessageExporter.CreateMessageWriter(String filePath, ExportFormat format, ExportContext context) in /DiscordChatExporter.Core/Exporting/MessageExporter.cs:92
  at DiscordChatExporter.Core.Exporting.MessageExporter.GetWriterAsync(CancellationToken cancellationToken) in /DiscordChatExporter.Core/Exporting/MessageExporter.cs:52
  at DiscordChatExporter.Core.Exporting.MessageExporter.ExportMessageAsync(Message message, CancellationToken cancellationToken) in /DiscordChatExporter.Core/Exporting/MessageExporter.cs:60
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /DiscordChatExporter.Core/Exporting/ChannelExporter.cs:73
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /DiscordChatExporter.Core/Exporting/ChannelExporter.cs:44
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /DiscordChatExporter.Core/Exporting/ChannelExporter.cs:79
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass43_2.<<ExecuteAsync>b__2>d.MoveNext() in /DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:166
  at DiscordChatExporter.Cli.Utils.Extensions.ConsoleExtensions.StartTaskAsync(ProgressContext progressContext, String description, Func`2 performOperationAsync) in /DiscordChatExporter.Cli/Utils/Extensions/ConsoleExtensions.cs:43
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass43_1.<<ExecuteAsync>b__1>d.MoveNext() in /DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:147
  at System.Threading.Tasks.Parallel.<>c__50`1.<<ForEachAsync>b__50_0>d.MoveNext() 
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass43_0.<<ExecuteAsync>b__0>d.MoveNext() in /DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:136
  at Spectre.Console.Progress.<>c__DisplayClass27_0.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:98
  at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:133
  at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:40
  at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:116
  at Spectre.Console.Progress.StartAsync(Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:96
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.ExecuteAsync(IConsole console, IReadOnlyList`1 channels) in /DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:134
  at DiscordChatExporter.Cli.Commands.ExportGuildCommand.ExecuteAsync(IConsole console) in /DiscordChatExporter.Cli/Commands/ExportGuildCommand.cs:35
  at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in /D:\a\CliFx\CliFx\CliFx\CliApplication.cs:147
  at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in /D:\a\CliFx\CliFx\CliFx\CliApplication.cs:191
jamestmartin commented 10 months ago

I am running into the same issue with the stable and latest branches. There is no error if I don't mount a volume, but then I don't get output. Changes to the docker parameters (e.g. :z, --privileged, different paths) doesn't seem to change anything. --fuck-russia doesn't appear to have any effect. Downgrading still works, but I'm sure that version will bit-rot eventually.

Tyrrrz commented 10 months ago

@jamestmartin can you specify the last version that works? Also, feel free to open a new issue since this one was closed by the author.

koo5 commented 10 months ago

(took a bit of digging, but ...) the change in 2.36.3 was that the output path inside docker is no longer /app/out but just /out. It was noted in a changelog somewhere but i can't find that now.

Tyrrrz commented 10 months ago

(took a bit of digging, but ...) the change in 2.36.3 was that the output path inside docker is no longer /app/out but just /out. It was noted in a changelog somewhere but i can't find that now.

Huh, that's from a while ago 🤔 Any clue why it would trigger the exception now? That directory shouldn't be any more protected than the previous one.

koo5 commented 10 months ago

Maybe @jamestmartin only pulled now

jamestmartin commented 10 months ago

(took a bit of digging, but ...) the change in 2.36.3 was that the output path inside docker is no longer /app/out but just /out. It was noted in a changelog somewhere but i can't find that now.

Huh, that's from a while ago 🤔 Any clue why it would trigger the exception now? That directory shouldn't be any more protected than the previous one.

At the time I posted, I didn't have the time to bisect the issue, and was just looking for whatever working version I could find. I probably should've opened a new issue in the first place since I already knew I last had it working with a more recent version in June.

koo5 commented 10 months ago

I can't check now but i'd also be suspicious of the $APP_UID thing used in the dockerfile, fwiw my commandline has an explicit --user 1000 there for some reason .. :)

Tyrrrz commented 10 months ago

I can't check now but i'd also be suspicious of the $APP_UID thing used in the dockerfile, fwiw my commandline has an explicit --user 1000 there for some reason .. :)

The user used to be created and set manually before, but now it's provided implicitly by the base image. In any case, both the previous and the current behavior rely on a non-root user.