Oddbean new post about | logout
 how2tip - auto start any docker container app from hosts systemd service debian/ubuntu #linuxstr
docker.service MUST be ENABLED for auto.start itself
sudo docker update --restart unless-stopped 3c82b4-contID
add new service as below exampe redisdb- "systemctl daemon-reload" + "enable" it also after testing
ExecStart=/home/dir/anyapp.sh 
nano /etc/systemd/system/mydocappautostart.service
++++++++++++++++
[Unit]
Description=Redis Container
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
Restart=always
ExecStart=/usr/bin/docker run --rm --name %n redis

[Install]
WantedBy=multi-user.target
++++++++++ 
 revised above typo - not starting container but just any app inside it.  "run" and "exec" big difference

ExecStart=/usr/bin/docker exec 3c82b4b5555contID /directory/bin/nostr-relay