The command '/bin/sh -c returned a non-zero code: 127

前端 未结 3 612
感动是毒
感动是毒 2021-02-05 01:19

I\'m new to docker so I might be doing this wrong, but I\'m trying to install Tomcat6 through a Dockerfile which like this:

FROM rhel7:latest
RUN cd         


        
3条回答
  •  孤城傲影
    2021-02-05 01:56

    Exit code 127 from shell commands means "command not found". So, in your case it seems the "wget" within quotes is not being found when Docker runs it.

    In some cases, the command to install wget (or whatever command-line tool is missing) must first be run in the Dockerfile because some base Docker images will not have wget. You would add a line before the failing command that looks something like this:

    RUN yum install -y wget
    

提交回复
热议问题