gdraheim / docker-systemctl-replacement

docker systemctl replacement - allows to deploy to systemd-controlled containers without starting an actual systemd daemon (e.g. centos7, ubuntu16)
European Union Public License 1.2
1.39k stars 399 forks source link

Failing to Start #144

Open doncoriolan opened 2 years ago

doncoriolan commented 2 years ago

Here is my systemd file

[Unit]
Description=Testnet Node
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/echo Testing
Restart=always
RestartSec=15
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

# python3 systemctl3.py start testnet I get no error when I run that command

root@568559733c3c:/home/docker-systemctl-replacement-1.4.3424/files/docker# python3 systemctl3.py status testnet
testnet.service - Testnet Node
    Loaded: loaded (/etc/systemd/system/testnet.service, enabled)
    Active: failed (failed)
INFO:systemctl:EXEC BEGIN /usr/bin/systemctl restart testnet --system
INFO:systemctl:system is offline
INFO:systemctl: restart service testnet.service => '/etc/systemd/system/testnet.service'
INFO:systemctl:simple start '/usr/bin/echo' 'Testing'
INFO:systemctl:simple started PID 1133
INFO:systemctl:simple stopped PID 1133 (OK) <->
WARNING:systemctl:simple start not active

When I do a status it shows as failed and nothing logs to journalctl. All i've done is downloaded the file and tried to run it. I am running Ubuntu 20.04. I think it might be user error but IDK what to do.

doncoriolan commented 2 years ago

I was able to create it successfully with the dockerfile for CentOs. I think there might be some issues with Ubuntu 20.04