falkowich / gvm10-docker

Non Official - Greenbone Vulnerability Management version 10 Docker image
29 stars 12 forks source link

Clean up postgresql startup #6

Closed falkowich closed 5 years ago

falkowich commented 5 years ago

The pgsql doesn't initialized correctly and you never write error recovery handler for pgsql after docker container restart. Also docker is no-daemon design. Please stop using init.d/systemd even it is working....

kmahyyg commented 5 years ago

Fixed.

Before all:

Please accept my apology. There're some misunderstand here. So sorry for that.

According to Docker Official Reference

According to the log of the container I run for test

About init.d

Next?

PR is on the way...

kmahyyg commented 5 years ago

So, what have I done now?

Assume

You start a container with an empty data persistent volume.

Expected behavior

All worked fine.

Actual Behavior

It won't start due to "not-existing, not-initialized, not-correct-owner, not-correct-file-system-permission" data folder.

What's behind?

My solution (What will I do in PR)

In DockerFile :

In entrypoint.sh of pgsql:

Still building the image in Docker Hub CI, will test later and give a response.

kmahyyg commented 5 years ago

by the way, have you ever meet this condition?

https://github.com/greenbone/gsa/issues/1364

falkowich commented 5 years ago

Thanks for the help!

Did you pull "master" from the repo?

I think that: All the dependencies should exist, and psql should work out of the box? The "only" thing that I didn't fix is decouple psql from init.d :)

About the greenbone/gsa#1364 condition. I cant recall that it happened to me before.

-- Regards Falk

kmahyyg commented 5 years ago

Thank you so much

falkowich commented 5 years ago

Closed for lack of input.