Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

oh-my-zsh installation returns non zero code

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?

like image 939
Tal Avatar asked Jun 09 '15 08:06

Tal


1 Answers

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
like image 117
ISanych Avatar answered Oct 01 '22 02:10

ISanych