yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

Docker command in README doesn't quite work out of the box

Open notnarb opened this issue 7 months ago • 0 comments

Context: Using Fedora Silverblue 42 + Podman. This issue may be Podman specific

Describe the bug

Using the Docker command in the README (ref):

docker run -it quay.io/redhat-developer/yaml-language-server:latest

The server doesn't appear to work as expected, ignoring SIGINT/SIGTERM and crashing soon after startup when started using emacs lsp-mode.

With a clue from #1012 I discovered that adding --pid=host seems to fix the issue 👍

Other flyby suggestions:

  • I think the -t command is unnecessary because you don't normally use a TTY to interact with a language server
  • maybe throwing in an --rm might be beneficial for users as this isn't a stateful container.

Saving the following as yaml-language-server in my $PATH appears to work as expected.

#!/bin/bash                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
exec podman run --pid=host --rm -i quay.io/redhat-developer/yaml-language-server:1.18.0 "$@" 

Suggested Change

Update the docker command in README.md to

docker run --rm -i --pid=host quay.io/redhat-developer/yaml-language-server:latest

Environment

  • [ ] Windows
  • [ ] Mac
  • [x] Linux
  • [ ] other (please specify)

notnarb avatar May 26 '25 23:05 notnarb