Alpine Linux:Podman systemdをopenrcに変換する

Alpine Linux:Podman systemdをopenrcに変換する

Alpine Linuxとpodmanコマンドを使用してコンテナsystemdを作成しました。

注文する:

podman generate systemd -n test -f

出力:

# container-test
# autogenerated by Podman 3.4.7
# Fri Apr 29 02:29:47 CEST 2022

[Unit]
Description=Podman container-test.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=on-failure
TimeoutStopSec=70
ExecStart=/usr/bin/podman start test
ExecStop=/usr/bin/podman stop -t 10 test
ExecStopPost=/usr/bin/podman stop -t 10 test
PIDFile=/run/containers/storage/overlay-containers/fc64dadf99ddb38f98ddcb3e022bc575ca39cd57f4e2e8c5cc63595377e2c3ad/userdata/conmon.pid
Type=forking

[Install]
WantedBy=default.target

Alpine Linuxはsystemdを使用しないため、このコンテナサービスをopenrcに変換する必要があります。

目標は次のとおりです。
特定のコンテナをサービスとして起動し、コンテナはルートにのみ表示される必要があります。

ベストアンサー1

このコンバーターを見つけました。 http://openrc.run/

この程度なら変換が可能です

おすすめ記事