Client library for connecting to a docker-exec-websocket-server, enabling remote execution of commands in Docker containers via WebSocket. Version 3.0.0 is stable with regular updates, supporting Node.js >12. It provides stdin/stdout/stderr streaming, TTY support, exit codes, and event hooks. Unlike raw WebSocket solutions, it handles pause/resume flow control and server shutdown events out of the box.
npm install docker-exec-websocket-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a docker-exec-websocket server, pipes local stdin to remote command, and streams stdout/stderr back.
Ensure the URL ends with the correct endpoint (e.g., '/a').
Pass tty: 'true' instead of tty: true.
Call await client.execute() before setting up pipes.
Use import syntax or enable CommonJS via bundler settings.
Start the server or verify the URL (e.g., ws://localhost:8081/a).
Use import DockerClient from 'docker-exec-websocket-client' or configure your bundler to handle ESM.
Add 'type':'module' to your package.json or use .mjs extension.