Home  >  Q&A  >  body text

dockerfile run build.sh

项目目录

...

Dockerfile
docker/build.sh

...

主要讲的就是 这样 2个文件

docker build

docker build -t apps/apps .

执行后会有一下错误

Step 8 : RUN docker/build.sh
 ---> Running in 019abf9e5ec8
/bin/sh: docker/build.sh: not found
The command '/bin/sh -c docker/build.sh' returned a non-zero code: 127

dockerfile 部分内容

COPY . /app/apps/
WORKDIR /app/apps/
RUN ./docker/build.sh

明明当前项目下 有这个 文件 ,为何提示没有找到呢 。

怪我咯怪我咯2757 days ago723

reply all(2)I'll reply

  • phpcn_u1582

    phpcn_u15822017-04-25 09:05:34

    COPY . /app/apps/
    WORKDIR /app/apps/
    RUN /docker/build.sh

    reply
    0
  • PHPz

    PHPz2017-04-25 09:05:34

    There is a logical error in your operation. You have not understood the concept of directories inside the container and the host. It is recommended that you execute sleep 1000 in the last step, and then open a separate terminal and enter the container to see whether your COPY step actually adds the host directory to the container.

    reply
    0
  • Cancelreply