dji-sdk / FlightRecordParsingLib

DJI Flight Record Parsing Lib
Other
39 stars 12 forks source link

Dockerfile error - sh: 0: Can't open generate.sh #11

Closed mcihadarslanoglu closed 11 months ago

mcihadarslanoglu commented 11 months ago

I am trying to run it on docker. However, here the error.

[+] Building 37.8s (11/11) FINISHED                                                                      docker:default
 => [internal] load .dockerignore                                                                                  0.2s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load build definition from Dockerfile                                                               0.2s
 => => transferring dockerfile: 385B                                                                               0.0s
 => [internal] load metadata for docker.io/library/ubuntu:16.04@sha256:a3785f78ab8547ae2710c89e627783cfa7ee7824d3  0.1s
 => [1/7] FROM docker.io/library/ubuntu:16.04@sha256:a3785f78ab8547ae2710c89e627783cfa7ee7824d3468cae6835c9f4eae2  0.0s
 => [internal] load build context                                                                                  3.2s
 => => transferring context: 2.38MB                                                                                2.3s
 => CACHED [2/7] RUN apt-get update                                                                                0.0s
 => CACHED [3/7] RUN apt-get install -y wget git gcc g++ make cmake                                                0.0s
 => CACHED [4/7] WORKDIR /parse_flyrecord                                                                          0.0s
 => [5/7] COPY . .                                                                                                33.7s
 => [6/7] WORKDIR /dji-flightrecord-kit/build/Ubuntu/FRSample                                                      0.1s
 => ERROR [7/7] RUN sh generate.sh                                                                                 0.4s
------
 > [7/7] RUN sh generate.sh:
0.324 sh: 0: Can't open generate.sh
------
Dockerfile:14
--------------------
  12 |
  13 |     WORKDIR /dji-flightrecord-kit/build/Ubuntu/FRSample
  14 | >>> RUN sh generate.sh
  15 |
  16 |     ENTRYPOINT ["./FRSample"]
--------------------
ERROR: failed to solve: process "/bin/sh -c sh generate.sh" did not complete successfully: exit code: 127
howff commented 11 months ago

I think you need to change the title of this issue to "Dockerfile error - sh: 0: Can't open generate.sh"

Either the WORKDIR command is wrong or the RUN command is wrong. Does the RUN command need to be RUN sh ./generate.sh ? Actually looking at your output the last WORKDIR is not the same as the one in this repo's Dockerfile. Please check the WORKDIR.

mcihadarslanoglu commented 11 months ago

@howff thank you for your response an suggestion about title.

Actually I changed nothing at first run and it did not work. Then I saw there is no folder named _parseflyrecord and deleted it.

howff commented 11 months ago

You'll need to understand how WORKDIR and RUN work in a Dockerfile before making changes. https://docs.docker.com/engine/reference/builder/

You shouldn't log this issue against a Dockerfile which you have modified. I suggest you close this issue and open a new one with the exact error message from a Dockerfile which you have not modified.

mcihadarslanoglu commented 11 months ago

@howff actually the error was same before I change the dockerfile. However, I will do it again and add results to here.

roothetic commented 11 months ago

@mcihadarslanoglu I have the same problem. Have you fond a solution by now?

mcihadarslanoglu commented 11 months ago

@roothetic Sorry for my late. I changed RUN sh generate.sh to CMD generate.sh. It worked for me, I use windows 10 OS.