OWASP/crAPI

Error building crapi-identity image

ArslanMazhar opened this issue · 3 comments

Describe the bug
i have facing the issue while installing i have delete my previous docker now install latest version by using guidence from https://computingforgeeks.com/install-docker-and-docker-compose-on-kali-linux/ now when i run by Build it yourself instruction it give issue
[sudo] password for kali:

  • set -e
  • dirname deploy/docker/build-all.sh
  • cd deploy/docker
  • find ../../services/ -name build-image*.sh
  • scripts=../../services/identity/build-image.sh
    ../../services/mailhog/build-image.sh
    ../../services/web/build-image.sh
    ../../services/workshop/build-image.sh
    ../../services/community/build-image.sh
  • echo Executing ../../services/identity/build-image.sh
    Executing ../../services/identity/build-image.sh
  • bash -x ../../services/identity/build-image.sh
  • set -x
    ++ dirname ../../services/identity/build-image.sh
  • cd ../../services/identity
  • docker build -t crapi/crapi-identity:latest .
    Sending build context to Docker daemon 410.6kB
    Step 1/14 : FROM gradle:7.3.3-jdk11 AS gradlebuild
    Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:52174->[::1]:53: read: connection refused
  • retVal=1
  • '[' 1 -ne 0 ']'
  • echo 'Error building crapi-identity image'
    Error building crapi-identity image
  • exit 1

To Reproduce
git clone https://github.com/OWASP/crAPI.git
deploy/docker/build-all.sh
now it give error

  • set -e
  • dirname deploy/docker/build-all.sh
  • cd deploy/docker
  • find ../../services/ -name build-image*.sh
  • scripts=../../services/identity/build-image.sh
    ../../services/mailhog/build-image.sh
    ../../services/web/build-image.sh
    ../../services/workshop/build-image.sh
    ../../services/community/build-image.sh
  • echo Executing ../../services/identity/build-image.sh
    Executing ../../services/identity/build-image.sh
  • bash -x ../../services/identity/build-image.sh
  • set -x
    ++ dirname ../../services/identity/build-image.sh
  • cd ../../services/identity
  • docker build -t crapi/crapi-identity:latest .
    Sending build context to Docker daemon 410.6kB
    Step 1/14 : FROM gradle:7.3.3-jdk11 AS gradlebuild
    Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:52174->[::1]:53: read: connection refused
  • retVal=1
  • '[' 1 -ne 0 ']'
  • echo 'Error building crapi-identity image'
    Error building crapi-identity image
  • exit 1

Expected behavior
Also when i run using Using prebuilt image
curl -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/main/deploy/docker/docker-compose.yml
docker-compose pull (it give error)
[+] Running 0/7
⠿ crapi-community Error 0.5s
⠿ crapi-identity Error 0.5s
⠿ mongodb Error 0.5s
⠿ postgresdb Error 0.5s
⠿ mailhog Error 0.5s
⠿ crapi-workshop Error 0.5s
⠿ crapi-web Error 0.5s
Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:59086->[::1]:53: read: connection refused

Runtime Environment
Docker version 20.10.18, build b40c2f6

It does not look like its a crapi bug rather its some issue with your docker setup. Could you try some solutions mentioned in this thread docker/cli#2618
This might work: docker/cli#2618 (comment)

Solution: run "systemctl cat docker.service" , and it will tell you where the docker service file is located. edit /lib/systemd/system/docker.service with your favorite text editor append "NetworkManager-wait-online.service" to line 4, that line should start with the word "After=" run
Debian
"systemctl daemon-reload" to update your changes to the service file.

As I have Worked on Debian 10 and 11.

Closing issue since no no response for more than 30 days. Please feel free to reopen if issue persists.