ThreatMapper icon indicating copy to clipboard operation
ThreatMapper copied to clipboard

run build.sh error: failed to read dockerfile

Open pythonmandev opened this issue 2 years ago • 2 comments

I get the lastest code and I run ./build.sh as root in the centos 7.4 with docker version 23.0.0, build e92dd87.

=> [stage-1 2/3] COPY --from=build /go/diagnosis/diagnosis /home/                                                                                                                                            0.1s 
=> [stage-1 3/3] RUN apk update --no-cache && apk upgrade --no-cache     && apk add --no-cache curl     && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux  5.2s 
=> exporting to image                                                                                                                                                                                        0.4s 
=> => exporting layers                                                                                                                                                                                       0.4s 
=> => writing image sha256:916eb967fa0004eb3b37318a9e0e6546b2d46aaac91f900ce02b79e3c402f3b0                                                                                                                  0.0s 
=> => naming to docker.io/deepfenceio/deepfence_diagnosis_ce:latest                                                                                                                                          0.0s 
Building Secret Scanner Image                                                                                                                                                                                      
bash: bootstrap.sh: No such file or directory                                                                                                                                                                      
[+] Building 0.1s (2/2) FINISHED                                                                                                                                                                                   
=> [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
=> => transferring dockerfile: 2B                                                                                                                                                                            0.0s
=> [internal] load .dockerignore                                                                                                                                                                             0.0s
=> => transferring context: 2B                                                                                                                                                                               0.0s
ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount4245371400/Dockerfile: no such file or directory
Building secret scanner image failed. Exiting

[root@VM-0-9-centos ThreatMapper]# docker images

REPOSITORY                                      TAG       IMAGE ID       CREATED          SIZE
deepfenceio/deepfence_diagnosis_ce              latest    916eb967fa00   38 minutes ago   106MB
deepfenceio/deepfence_fetcher_ce                latest    0cdf219f7103   40 minutes ago   692MB
deepfenceio/deepfence_ui_ce                     latest    e0f3263274e6   41 minutes ago   627MB
deepfenceio/deepfence_api_ce                    latest    bdd455b17f80   46 minutes ago   1.26GB
deepfenceio/deepfence_router_ce                 latest    d400dade21b6   49 minutes ago   33.9MB
deepfenceio/deepfence_postgres_ce               latest    5be41f5ad124   50 minutes ago   211MB
deepfenceio/deepfence_redis_ce                  latest    8c4215d0d6b9   50 minutes ago   31.6MB
deepfenceio/deepfence_elastic_ce                latest    a16f952f491b   50 minutes ago   388MB
deepfenceio/deepfence_vulnerability_mapper_ce   latest    89fdecff9ed1   51 minutes ago   114MB
deepfenceio/deepfence_init_ce                   latest    d0e71b721823   52 minutes ago   7.74MB

[root@VM-0-9-centos ThreatMapper]# docker ps -a

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

pythonmandev avatar Feb 09 '23 07:02 pythonmandev

@pythonmandev Did you modify anything? and also can you disable the buildkit in docker and try once again?

ibreakthecloud avatar Feb 15 '23 06:02 ibreakthecloud

I did not modify anything,I set { "features": { "buildkit": false } } and rebuild,it still the same. Building diagnosis [+] Building 0.3s (14/14) FINISHED
=> [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 656B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/alpine:3.17 0.2s => [internal] load metadata for docker.io/library/golang:1.19-alpine3.17 0.3s => [build 1/5] FROM docker.io/library/golang:1.19-alpine3.17@sha256:1a444aca58a76ddde335f566b80c31dab081dffd52f3c60367cc3744bd323079 0.0s => [stage-1 1/3] FROM docker.io/library/alpine:3.17@sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126 0.0s => [internal] load build context 0.0s => => transferring context: 356B 0.0s => CACHED [build 2/5] RUN apk add --no-cache git 0.0s => CACHED [build 3/5] ADD . /go/diagnosis/ 0.0s => CACHED [build 4/5] WORKDIR /go/diagnosis/ 0.0s => CACHED [build 5/5] RUN go build -o diagnosis *.go 0.0s => CACHED [stage-1 2/3] COPY --from=build /go/diagnosis/diagnosis /home/ 0.0s => CACHED [stage-1 3/3] RUN apk update --no-cache && apk upgrade --no-cache && apk add --no-cache curl && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bi 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:4005336e769758b0fb2fca619c606a09302eef1167b7d5e46c1b1e6eea0eda9b 0.0s => => naming to docker.io/deepfenceio/deepfence_diagnosis_ce:latest 0.0s Building Secret Scanner Image bash: bootstrap.sh: No such file or directory [+] Building 0.0s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount2044260531/Dockerfile: no such file or directory Building secret scanner image failed. Exiting

pythonmandev avatar Apr 18 '23 13:04 pythonmandev