Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUnfriendly output in Jenkins #225
Comments
|
If this is the v6 image, then what you are most likely seeing is there is the output of npm@3's progress bar. Try this:
|
|
@chorrell is right, and while your at it, disable the spinner as well:
|
|
@chorrell and @Starefossen Thanks for your replies. However, the updated Dockerfile with both progress and spin had no effect.
Is there anything else you need? Should be said, before the npm commands, there are no problems with the std output. |
|
As a simple test case, just doing something like this works when I tried it: FROM node:6.4.0
ENV NPM_CONFIG_PROGRESS false
ENV NPM_CONFIG_SPIN false
WORKDIR /app
RUN npm install expressAre you running the export NPM_CONFIG_PROGRESS=false
export NPM_CONFIG_SPIN=falseI don't think the Another option would be to add a COPY .npmrc /appAnd in your .npmrc file: progress=false
spin=false |
|
Thanks for the additional suggestions @chorrel. However, none of the suggested ideas helped. I searched for info regarding the codes generated by the The format almost exactly matches my logs. And continuing testing with building docker images locally, I noticed that the I have continued to try to turn off the colors with both with:
Each time I still get the red coloring when viewing the docker console. When doing the same procedures locally, the output was not colored. My only conclusion is that the configuration doesn't work for in the docker image. Please prove me wrong =) |
|
@mraxus could you try to add
|
|
@Starefossen Same results. I would believe this is very easily reproducible for anyone. Dockerfile
run.sh
put them in a folder and run the command: |
|
I think it might have something to do with the output of the docker run -it --rm node:6.4.0 npm --color false install async |
|
@chorrell Very interesting. Same result for me too. But it have to be originating from npm somehow, since it still colors but only some part, not everything the same way. Frustrating, nonetheless. |
|
Another option you might want to consider is
https://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin (colorizes the
ANSI escapes in the Jenkins output).
|
|
@tianon If that works, it would be amazing. Will try it out, if the infra guys allows ;-) Thanks for the tip! @chorrell, @Starefossen: I don't think I will spend more time on this, so do with this issue as you please. Thank you so much for the help anyways. Much appreciated! |
|
I have the same problem, except I'm not using Jenkins, but rather Dockerhub where I don't have any control over things like plugins. |
|
At this point it's not clear whether this is something that can be addressed in the Dockerfiles. Based on my experiments in #225 (comment), it seems like it's an issue with |
|
Problem is that your Jenkins just does not support ANSI escape sequences in the console output. All output on |
|
Closing since #225 (comment) addresses the issue for the OP. I don't think we can do anything about the Dockerhub (if that's still an issue) |
|
Hmm, I still have the exact same problem. .npmrc:
Dockerfile:
Now if I build the image like this: docker build -t fancy-image-name .Then the output is still showing colors even though the config says "color = false":
The lines featuring |
|
I noticed that npm outputs progress to STDERR. Redirecting STDERR to STDOUT in my Dockerfile fixed the output problem: |
|
@zsteinkamp Wow that magically worked :o |
|
Oh, this would be a really good thing to add to the docs! |
Hello and thanks for docker-node!
I have an issue with the printout from the container.
Before each
[there is an ESC character but I stripped that from the same since it's not shown in the output of the Jenkins console.My question:
Can I disable the output from printing all these extra characters?
I tried to add this in the
Dockerfilebut it did not seem to help =-(Cheers,
-- mraxus