1

I am running yo in a Docker container and in my Dockerfile, I have the command RUN echo no | yo doctor. When yo runs for the first time, it asks for an answer to:

==================================================================== We're constantly looking for ways to make yo better! May we anonymously report usage statistics to improve the tool over time? More info: https://github.com/yeoman/insight & http://yeoman.io ==================================================================== (Y/n)

Every time, I create a new container, yo is asking me the same question again. Since each container is being built using the same image and I am running echo no | yo doctor in my Dockerfile shouldn't it prevent yo from asking the question again?

1

1 Answer 1

1

Whenever I see a RUN using pipe, I try that command in a subshell (sh -c)

RUN sh -c 'echo no | yo doctor'

If it does not work, another workaround would be to include that command in a script, COPY the script and RUN it.

Sign up to request clarification or add additional context in comments.

2 Comments

This doesn't fix the problem. The command runs fine when I run docker build. When I create a new container using docker run, yo still asks that question.
@Shan What is your ENTRYPOINT and CMD? What is executed on docker run?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.