oh-my-zsh installation returns non zero code

1.8k views Asked by At

I'm trying to install oh-my-zsh as part of a Docker build (using a Dockerfile). Here's the dockerfile line in question:

RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh`

and the error I get is:

The command [/bin/sh -c wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh] returned a non-zero code: 1

Full error gist here

To debug, I've run the command manually and it works. Did anyone have luck installing oh-my-zsh as part of a docker build? any idea why it behaves differently if run this way?

1

There are 1 answers

1
ISanych On BEST ANSWER

Build failing because install.sh return non zero code, when you execute script manually you are ignoring return code, but docker failing build. Usually non-zero return code indicate error, but if in this case everything ok you could ignore this error:

RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true