I have a docker container which intentionally should serve node.js environment. Something similar to configuration described in this article. But I want to create my own project. Is there are a way to run npm init and generate package.json with container? If I run this command it fails on first question. How can I answer on those questions?
N.B.: Its not a problem to create this file manually(or use -y option) but I think this usercase illustrate more general concept
Note: actually it's a kind of problem to run this command with -y option. When you do that you have the same dialog with questions
A couple options
I'd probably choose 2. So this is more of a question about handling bash input, rather than about docker per se.