podman generated systemd file for mssql-server container

Latest response

Update: I do this podman generate today and I get a different result attached. "pdm0sysd.txt" makes more sense and I will try.

I used "podman generate systemd" for a configured sqlx22 container and got the attached file which seems to have all the initial configuration command.

What would be the minimal revised ExecStart to use after configuration? Do I need to keep specifying name and hostname?
I would think all the -e 's should be omitted? When I start manually all I use is "sudo podman start sqlx22".

podman generated ExecStart:
ExecStart=/usr/bin/podman run \
--cidfile=%t/%n.ctr-id \
--cgroups=no-conmon \
--rm \
--sdnotify=conmon \
--replace \
-e ACCEPT_EULA=Y \
-e MSSQL_SA_PASSWORD=SQueeZY2*ZX \
-e MSSQL_PID=Express \
--name sqlx22 \
--hostname sqlx22 \
-p 1433:1433 \
-d mcr.microsoft.com/mssql/rhel/server:2022-latest

Responses

This must have been some kind fluke when I ran the generate the first time. Everything came out ok a day later. sudo podman generate systemd -n -f --restart-policy=always sqlx22 >pdm2sysd.txtsudo cp container-sqlx22.service /etc/systemd/system sudo systemctl enable container-sqlx22.service

container-sqlx22.service autogenerated by Podman 4.2.0 Tue Jan 24 17:00:30 CST 2023

[Unit] Description=Podman container-sqlx22.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=/run/containers/storage

[Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=always TimeoutStopSec=70 ExecStart=/usr/bin/podman start sqlx22 ExecStop=/usr/bin/podman stop -t 10 sqlx22 ExecStopPost=/usr/bin/podman stop -t 10 sqlx22 PIDFile=/run/containers/storage/overlay-containers/afcbd216eedb0d74075a522e8fc6cfc5a8dc8a0a3dfb2ce65434891b30fb0eb8/userdata/conmon.pid Type=forking

[Install] WantedBy=default.target