jessfraz / dockerfiles

Various Dockerfiles I use on the desktop and on servers.
https://blog.jessfraz.com/post/docker-containers-on-the-desktop/
MIT License
13.63k stars 2.55k forks source link

Postgres no longer starts in metasploit #366

Open danwdart opened 6 years ago

danwdart commented 6 years ago

Postgres as it is now doesn't like not being inside systemd:

$ docker run --rm -it jess/metasploit
[ ok ] Starting PostgreSQL 10 database server: main.
System has not been booted with systemd as init system (PID 1). Can't operate.
[+] Starting database
System has not been booted with systemd as init system (PID 1). Can't operate.
[+] Creating database user 'msf'
[+] Creating databases 'msf'
[+] Creating databases 'msf_test'
[+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml'
[+] Creating initial database schema
System has not been booted with systemd as init system (PID 1). Can't operate.
[+] Starting database
System has not been booted with systemd as init system (PID 1). Can't operate.
kabachook commented 6 years ago

It seems to be an error of msfdb. Although it drops errors, it works perfectly fine. Probably this error should be ignored.

root@8ce0cb6bb639:/# /etc/init.d/postgresql start
[ ok ] Starting PostgreSQL 10 database server: main.
root@8ce0cb6bb639:/# msfdb init
System has not been booted with systemd as init system (PID 1). Can't operate.
[+] Starting database
System has not been booted with systemd as init system (PID 1). Can't operate.
[+] Creating database user 'msf'
[+] Creating databases 'msf'
[+] Creating databases 'msf_test'
[+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml'
[+] Creating initial database schema
root@8ce0cb6bb639:/# msfconsole -q
msf >

p.s. tested on both r.j3ss.co/kalilinux and kalilinux/kali-linux-docker