Skip to content

Fix OS-Windows use docker error(exit code 125)#559

Open
ISouthRain wants to merge 3 commits intozevlg:masterfrom
ISouthRain:fix/OS-Windows
Open

Fix OS-Windows use docker error(exit code 125)#559
ISouthRain wants to merge 3 commits intozevlg:masterfrom
ISouthRain:fix/OS-Windows

Conversation

@ISouthRain
Copy link
Copy Markdown

Now, telega.el can be run using docker on Windows systems.

Already tested platforms:

  1. Windows 10
  2. WSL2 (Debian)
  3. Emacs 30.1

normal operation.

What do you think?

@zevlg
Copy link
Copy Markdown
Owner

zevlg commented Mar 17, 2026

host path to docker path translations looks way too complicated and danger. It might not work as you expect. It might even affect some text message content if its text looks like your local path.

Why can't you use same telega-directory name on host and docker? I'm afraid host-docker path translation can't be done right with a small blood because JSON (and plists) does not have dedicated type for the "path" thing, and all paths are strings.

Path translations should be done explicitly in the code via some file accessing API, something like telega-local-path-import and telega-local-path-export methods which will do path translations.

Other parts of the patch are discussible. Please describe parts where Windows docker functionality differs from docker on Linux

@ISouthRain
Copy link
Copy Markdown
Author

ISouthRain commented Mar 17, 2026

Why can't you use same telega-directory name on host and docker? I'm afraid host-docker path translation can't be done right with a small blood because JSON (and plists) does not have dedicated type for the "path" thing, and all paths are strings.

Because the path addresses of Windows and Linux are different, for example:
LInux dir: /root/A1/A2
Winodws dir: C:/A1/A2

Another reason is that because the docker image of telega-server is Linux, C:/A1/A2 cannot be directly passed to docker in the same format as the Windows native address.

I hope you can give me more guidance.
If you have any other questions, please contact me, thank you!

@zevlg
Copy link
Copy Markdown
Owner

zevlg commented Mar 17, 2026

Is it possible to create Windows docker image?

I'm trying to avoid path translation if possible. If not possible, then it will require patching every piece of telega code where file path is used or provided to TDLib. Your current approach to path translation is danger, it can have unexpected side effects

Please create FR (Feature Request) issue for path translations. I'll create API for the path translations, and then you will be able to use this API to translate paths in the correct way to implement docker support for Windows OS

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

Successfully merging this pull request may close these issues.

2 participants