[Link]
com/Containerfile
dnf -y install container-tools
useradd apple
passwd 1
ssh-keygen
ssh-copy-id -f -i /root/.ssh/id_rsa.pub apple@localhost
***build the image named monitor***
*** download file from [Link]
*** username – apple password – 1 ***
# ssh apple@localhost (ssh apple@node1)
$ podman login -u admin -p redhat321 [Link] --tls-verify=false
$ wget [Link]
$ podman build -t monitor .
$ podman images
$ exit
***Mount the directories “files” & “processed”:***
***files (in your VM): incoming (container)***
***processed (in your VM): outgoing (container)***
# mkdir /opt/files /opt/processed
# chmod 777 /opt/files /opt/processed
# chown apple:apple /opt/files /opt/processed
# ssh apple@localhost
$ podman run -d --name ascii2pdf -v /opt/files:/opt/incoming:Z -v
/opt/processed:/opt/outgoing:Z localhost/monitor:latest
$ podman ps
***Creating a container as a service***
$ mkdir -p ~/.config/systemd/user
$ cd ~/.config/systemd/user
$ podman generate systemd --name ascii2pdf --files --new
$ podman stop ascii2pdf
$ podman rm ascii2pdf
$ systemctl --user daemon-reload
$ systemctl --user start [Link]
$ systemctl --user enable [Link]
$ systemctl --user status [Link]
$ loginctl enable-linger apple
$ loginctl show-user apple
$ exit
# reboot
# ssh apple@localhost
Password:
$ pdman ps