immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
354 stars 102 forks source link

cant run new container - postgresql folder error #23

Closed fufar closed 3 years ago

fufar commented 3 years ago

docker run --detach --publish 8080:9392 -e PASSWORD="admin" --name openvas immauss/openvas:20.08.03.1

container doesn't start

docker logs openvas
8:C 25 Jan 2021 15:37:40.415 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
8:C 25 Jan 2021 15:37:40.415 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=8, just started
8:C 25 Jan 2021 15:37:40.415 # Configuration loaded
Wait for redis socket to be created...
Testing redis status...
Redis ready.
Creating Data and database folder...
mv: cannot move '/var/lib/postgresql/12/main' to '/data/database': No such file or directory

tryed also openvas:20.08.03 and openvas:20.08.02 - same error

centos 7 docker 1.12

fufar commented 3 years ago

version openvas:pre-20.08 working fine for me

immauss commented 3 years ago

Thanks. I've done all my testing with a volume mounted at /data, so i didn't cat this one. try immauss/openvas:20.08.03.2 or :latest It should work. If not, please let me know.

-Scott

fufar commented 3 years ago

tryed immauss/openvas:20.08.03.2, it is running now, but after launch cant run task wizard - get error

Failed to find config 'daba56c8-73ec-11df-a475-002264764cea'

google says that it is some file ownership issue

immauss commented 3 years ago

How long are you waiting after you start the container? gmvd needs some time to import all the downloaded content into the database. One of the last things to happen in the process is the creation of the initial Scan Configs. If they aren't there yet, then it's not ready.

One of my ongoing projects is to build an image with the initial database already created. Step one was shrinking the original image, which I have it down to 1.5G from almost 2.5G. Working on the best way to package up the DB and still be able to keep it up to date without too much effort.

fufar commented 3 years ago

I used to wait 2-3 hours, but left on night - and it worked ok, thx

immauss commented 3 years ago

Glad that worked. Let me know if you have any other issues.