Restarting docker container from command line without trigger System Event Notifications

Currently reading
Restarting docker container from command line without trigger System Event Notifications

3
0
NAS
DS1515+
Operating system
  1. Linux
  2. Windows
Hello,

I have set up a couple of docker containers on my DiskStation DS1515+ wiuth DSM 6.2.3-25426 Update 3.
These containers include:
- Reverse proxy nginx
- LetsEncrypt
- Gitea

When my LetsEncrypt container renews the SSL certificates, I need to restart my Gitea container to have it actually use the new certificates.
I couldn't find a way in the docker GUI to schedule this, so I looked to the next-best thing: the Task Scheduler.

It is easy enough to create a task that calls docker restart <gitea container name>, but this always results in a System Event notificaction saying that the container stopped unexpectedly.
Is there a way to stop/restart docker containers from the CLI without triggering these events?

Thanks in advance.
 
My issue has to do with cluttering the System Events with "unexpected stop" messages when they are very much expected.
I prefer a clean log where only actual issues are shown.

When a container is stopped through the GUI these events don't happen.
I was hoping to do something similar from the command line / Task Scheduler.
 
I do get them for stopping the container.

Code:
thijs@DT_Server:~$ sudo docker ps | grep gitea
fb74eec91ead        gitea/gitea:1.13.0            "/usr/bin/entrypoint…"   6 weeks ago         Up 6 hours          0.0.0.0:23022->22/tcp, 0.0.0.0:23080->80/tcp, 0.0.0.0:23000->3000/tcp   gitea-1.13.0
thijs@DT_Server:~$ sudo docker stop gitea-1.13.0
gitea-1.13.0
thijs@DT_Server:~$ sudo tail -n1 /var/log/sysnotify.log
2021-01-20T17:31:03+01:00 DT_Server notify: sysnotify_send_notification.c:615 SYSNOTIFY: [docker_container_unexpected_exit] was sent to desktop

I have never seen any notifications for starting a container.

Just to be on the safe side, also some version information.
Code:
thijs@DT_Server:~$ sudo docker version
Client:
 Version:           18.09.8
 API version:       1.39
 Go version:        go1.11
 Git commit:        bfed4f5
 Built:             Fri Mar 13 06:46:11 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.8
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.11
  Git commit:       3a371f3
  Built:            Fri Mar 13 06:44:35 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Old thread notice: There have been no replies in this thread for quite some time. The last reply was on .
The content in this thread may no longer be relevant. It might be better to open a new thread instead.

Similar threads

Apache 2.4 in dsm 7.2 does not run after restarting DSM Leading to errors in WordPress, Joomla,... Out of...
Replies
0
Views
507
  • Question
Of course, I had just looked at the wrong place (Firewall). Thank you.
Replies
10
Views
3,112
If you check one of these boxes, you change effective permissions for that particular user only. You don't...
Replies
2
Views
5,329
To setup hardware accelerated transcoding in Plex with Plex Pass, you will either need create the...
Replies
5
Views
10,586
makes you wonder what's wrong with nginx, maybe it's not writing the changes to nginx.conf or something.
Replies
38
Views
5,529
Anyone setting Valheim Plus with the Docker interface in Synology? I go through some instructions online...
Replies
12
Views
3,928

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top