1modm / petereport

PeTeReport is an open-source application vulnerability reporting tool.
https://1modm.github.io/petereport/
BSD 3-Clause "New" or "Revised" License
449 stars 131 forks source link

Problem creating docker #56

Closed saheredelgadom closed 1 year ago

saheredelgadom commented 1 year ago

docker-compose build --build-arg TARGETARCH=amd64 nginx uses an image, skipping Building petereport Sending build context to Docker daemon 123.4MB Step 1/29 : FROM ubuntu:20.04 ---> 3bc6e9f30f51 Step 2/29 : ENV PYTHONUNBUFFERED 1 ---> Using cache ---> 83ed05e8b764 Step 3/29 : ENV PYTHONDONTWRITEBYTECODE 1 ---> Using cache ---> a0c72f9ff857 Step 4/29 : ARG DEBIAN_FRONTEND=noninteractive ---> Using cache ---> a13852907155 Step 5/29 : RUN apt-get -y update ---> Using cache ---> e63bc44a5fd8 Step 6/29 : RUN apt-get -y upgrade ---> Using cache ---> 286bc59a1158 Step 7/29 : RUN apt install locales locales-all -y ---> Running in 05b8c8eb26ed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists... Building dependency tree... Reading state information... Package locales is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

Package locales-all is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'locales' has no installation candidate E: Package 'locales-all' has no installation candidate The command '/bin/sh -c apt install locales locales-all -y' returned a non-zero code: 100 ERROR: Service 'petereport' failed to build : Build failed

My operacional system is Ubuntu 22.04

You can help me, please????

saheredelgadom commented 1 year ago

Docker had internet connection problems

It was solved like this:

  1. Create a daemon.json file to add the dns that your machine uses and the google dns that docker uses like this:

{ "dns": ["1.1.1.1", "8.8.8.8"] }

  1. The file /etc/resolvf.conf has a symbolic link that is directed to a default file in ubuntu that contains an ip like 127.0.0.53

we have to make the link like this: ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf which is really the dns used by the network.

  1. It will force Docker to recreate the bridge and reset all network rules.

with this script: pkill docker iptables -t nat -F ifconfig docker0 down brctl delbr docker0 docker -d

  1. Restart docker service

service docker restart

  1. Clear all docker install error cache with this command:

docker system prune

  1. Run the docker installation again

$ docker-compose build --build-arg TARGETARCH=amd64 $ docker-compose up

Go to https://127.0.0.1/ Login with any of users created admin/P3t3r3p0rt (administrator) and viewer/v13w3r (viewer) or the user credentials configured in the configuration file