""快跑/gradlew build-x test`命令错误



我一直在尝试使用docker安装conductor,但我一直收到错误。我试着用[https://github.com/Netflix/conductor/tree/main/docker][1] 命令。但是第一个命令不起作用(gradlew-build(,我使用了gradlew-init。当运行第二个命令(docker build-t conductor:server./server(时

=> [internal] load build definition from Dockerfile                                                               0.0s
=> => transferring dockerfile: 923B                                                                               0.0s
=> [internal] load .dockerignore                                                                                  0.0s
=> => transferring context: 2B                                                                                    0.0s
=> [internal] load metadata for docker.io/library/openjdk:8-jre-alpine                                            5.3s
=> [internal] load metadata for docker.io/library/openjdk:8-jdk                                                   5.3s
=> [auth] library/openjdk:pull token for registry-1.docker.io                                                     0.0s
=> [internal] load build context                                                                                  0.1s
=> => transferring context: 1.33kB                                                                                0.0s
=> [builder 1/4] FROM docker.io/library/openjdk:8-jdk@sha256:96c15b4ddc92615cc8ab30b60deba963232de521784661e1ab8  0.0s
=> CANCELED [stage-1 1/6] FROM docker.io/library/openjdk:8-jre-alpine@sha256:f362b165b870ef129cbe730f29065ff3739  0.9s
=> => resolve docker.io/library/openjdk:8-jre-alpine@sha256:f362b165b870ef129cbe730f29065ff37399c0aa8bcab3e44b51  0.0s
=> => sha256:f362b165b870ef129cbe730f29065ff37399c0aa8bcab3e44b51c302938c9193 1.64kB / 1.64kB                     0.0s
=> => sha256:b2ad93b079b1495488cc01375de799c402d45086015a120c105ea00e1be0fd52 947B / 947B                         0.0s
=> => sha256:f7a292bbb70c4ce57f7704cc03eb09e299de9da19013b084f138154421918cb4 3.42kB / 3.42kB                     0.0s
=> => sha256:e7c96db7181be991f19a9fb6975cdbbd73c65f4a2681348e63a141a2192a5f10 0B / 2.76MB                         0.9s
=> => sha256:f910a506b6cb1dbec766725d70356f695ae2bf2bea6224dbe8c7c6ad4f3664a2 0B / 238B                           0.9s
=> => sha256:b6abafe80f63b02535fc111df2ed6b3c728469679ab654e03e482b6f347c9639 0B / 54.94MB                        0.9s
=> CACHED [builder 2/4] COPY . /conductor                                                                         0.0s
=> CACHED [builder 3/4] WORKDIR /conductor                                                                        0.0s
=> ERROR [builder 4/4] RUN ./gradlew build -x test                                                                0.9s
------
> [builder 4/4] RUN ./gradlew build -x test:
#12 0.803 /bin/sh: 1: ./gradlew: not found
------
executor failed running [/bin/sh -c ./gradlew build -x test]: exit code: 127

我正在使用窗口我试着改变RUN/gradlew build-x测试到。\gradlew,gradlew,。。\gradlew/gradlew,但什么都没用。

谢谢

根本原因是文件gradlew在windows上是DOS格式。在撰写或构建之前,您需要提前将文件格式转换为unix格式,因此需要添加:

RUN apt-get update && apt-get install -y dos2unix && dos2unix gradlew
RUN find ./ -name "*.java" | xargs dos2unix

之前

RUN ./gradlew build -x test

在服务器折叠下的DockerFile中。

让我公开我执行的步骤,这在上进行了解释,https://github.com/Netflix/conductor/issues/1814.

  1. 删除当前导体文件夹
  2. 运行git-config--global-core.autocrlf false;或者,如果你过去跑步,只需确保它已经设置好
  3. 再次克隆导体回购
  4. 通过打开DockerFile(例如=>conductor/doker/server/DockerFile
  5. 在指挥/码头工人身上运行码头工人

这对我有用!

相关内容

  • 没有找到相关文章

最新更新