Category : systemd

In order to avoid starting docker and a pgadmin container at boot, I’m trying to trigger the start of the container using a systemd socket listening on the container’s port (49490) on localhost. This way the first time I connect to 127.0.0.1:49490, docker is launched and the corresponding container is started, and I access the ..

Read more

I have a bash script that is used to speed up two docker containers using docker run, is it possible to configure that as a systemd service? Is there any special configuration that is required? Thanks! [Unit] Description=My Shell Script After=network-online.target [Service] ExecStart=/usr/bin/script.sh RestartSec=3 Restart=always [Install] WantedBy=multi-user.target Source: Docker..

Read more

I’ve been using dbus to start/stop services on the host (ubuntu) from a docker container (alpine) Currently dbus messages are sent using dbus-send cli command as such, host-service ssh stop would call a bash script /usr/bin/host-service that calls dbus-send with the relevant arguments. Other approach is using python libraries dbus and systemd_dbus Now there is ..

Read more

I have a bunch of Docker containers running and I would like them to shutdown gracefully (the containers are running my kubernetes cluster via [rancher](https://rancher.com/)). I noticed that when I tail the journalctl -fu docker.service it seems like only about 10 seconds before the docker.service is completely shut down but I know that it should ..

Read more

I am running a WireGuard service with a user interface and want to deploy WireGuard using docker. Looking for alternatives or the correct way to execute ‘wg-restart.service‘. /etc/systemd/system/wg-restart.service [Unit] Description=Restart WireGuard After=network.target [Service] Type=oneshot ExecStart=/usr/bin/systemctl restart [email protected] /etc/systemd/system/wg.watch [Unit] Description=Watch for file wg0.conf changes [Path] PathModified=/etc/wireguard/wg0.conf [Install] WantedBy=multi-user.target I am can bind volume from docker ..

Read more

I’m trying to create a amazon ssm agent container on coreos instance on aws. I was trying the below config for my coreos ec2 instance but it is not creating the amazon-ssm-agent.service on the instance. Could anyone let me know what am doing wrong here. coreos: update: reboot-strategy: off units: – name: "docker.service" command: "start" ..

Read more