-
Notifications
You must be signed in to change notification settings - Fork 63
twilio cli inside a docker container - issues with npm pkg window-size #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I found a workaround for now, I set the COLUMNS and ROWS environment variables and the problem is gone. "window-size" uses those internally. So in the entrypoint, I used:
right before calling "twilio serverless:start". I quickly tried setting the variables in the .env file instead but that didn't work though in theory it should've. |
Oh thanks for catching this! The reason why the The fix in my opinion should be the following.
So instead of the following: https://github.com/twilio-labs/twilio-run/blob/7bd4f7c6689c52fa36484e31aef716d3584ef0cb/src/printers/utils.ts#L4-L7 The code should be something like: import size from 'window-size';
export const windowSize = size.get() || { width: 80, height: 300 }
|
use fixed windowSize when not available (in case of Docker CMD etc) fix #82
Thanks for raising this @hcheg and thank you @saadismail for fixing it! The fix has been released in v1.1.1 of npm.im/@twilio-labs/plugin-serverless and v2.1.1 of npm.im/twilio-run |
Hello!
I'm running the Twilio-cli inside a docker container, running "twilio server less:start" works perfectly if I run it manually from inside the running container but it fails when run using the docker CMD in the Dockerfile or from the entrypoint file. I didn't dig too much but it looks like the window-size npm pkg doesn't like to run without an actual console.
Here's the error I get:
The text was updated successfully, but these errors were encountered: