This commit is contained in:
2024-11-25 23:41:54 -07:00
parent c62ad0c1ad
commit c192f07a66
12 changed files with 167 additions and 141 deletions

View File

@ -194,99 +194,6 @@ cat /etc/bash_history_2024-11-05.txt
exit
```
## Podman Quadlet Rootless Example
```bash Tue Nov 05 2024 17:54:37 GMT-0700 (Mountain Standard Time)
apt-get install podman -y
apt-cache rdepends podman-compose
apt-get install podman-compose -y
apt-get install sudo
# apt-get remove podman-compose -y
# apt-get purge podman-compose -y
adduser podman
mkdir /home/podman/.ssh
cp /root/.ssh/authorized_keys /home/podman/.ssh/authorized_keys
chown podman:podman -R /home/podman
adduser podman sudo
loginctl enable-linger
sudo -iu podman
# 2.
podman --version
# podman version 4.3.1
# https://www.redhat.com/sysadmin/quadlet-podman
cd ~/
mkdir -p .config/containers/systemd/
# nano .config/containers/systemd/mysleep.container
exit
```
```bash Tue Nov 05 2024 17:55:28 GMT-0700 (Mountain Standard Time)
# cp -R /run/user/0/ /run/user/1000/
mkdir -p /run/user/1000/
chown -R podman:podman /run/user/1000/
sudo -iu podman
cd ~/
mkdir -p ~/.bashrc.d
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
source ~/.bashrc.d/systemd
sudo loginctl enable-linger 1000
systemctl --user daemon-reload
podman ps -a --sort names
# systemctl --user enable --now podman.socket
# systemctl --user status mysleep.service
```
## how to run a shell scripts at every login
- [how-to-run-a-shell-scripts-at-every-login](https://serverfault.com/questions/782433/how-to-run-a-shell-scripts-at-every-login-in-centos)
```bash Tue Nov 05 2024 17:56:47 GMT-0700 (Mountain Standard Time)
nano ~/.bash_profile
```
```conf Tue Nov 05 2024 17:56:49 GMT-0700 (Mountain Standard Time)
cd ~/
mkdir -p ~/.bashrc.d
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.bashrc.d/systemd
source ~/.bashrc.d/systemd
loginctl enable-linger 1000
systemctl --user daemon-reload
podman ps -a --sort names
```
- [user-flag-rootless-containers](https://www.redhat.com/en/blog/user-flag-rootless-containers)
```bash Tue Nov 05 2024 18:36:38 GMT-0700 (Mountain Standard Time)
podman run --user 1000 -d fedora sleep 10
find / -name "*fedora*" 2>/dev/null
podman run --user 1000 -d docker.io/louislam/uptime-kuma
```
```bash Tue Nov 05 2024 19:17:28 GMT-0700 (Mountain Standard Time)
exit
podman pull docker.io/louislam/uptime-kuma:1
systemctl --user daemon-reload
systemctl --user start uptime-kuma-server
# Failed to start uptime-kuma-server.service: Unit uptime-kuma-server.service not found.
# Podman rootless unit search path
# Quadlet files for non-root users can be placed in the following directories
# ~/.config/containers/systemd/
chown -R podman:podman /home/podman/.config/containers/systemd
chown -R podman:podman /home/podman
systemctl --user list-unit-files
ls -la /usr/libexec/podman
# lrwxrwxrwx 1 root root 19 Nov 4 2021 catatonit -> ../../bin/catatonit
# -rwxr-xr-x 1 root root 1999200 Oct 1 14:54 quadlet
# -rwxr-xr-x 1 root root 3558560 Oct 1 14:54 rootlessport
/usr/libexec/podman/quadlet -dryrun --user
/usr/libexec/podman/quadlet --user /home/podman/libexec-podman-quadlet-output
# -bash: /usr/libexec/podman/quadlet: No such file or directory
systemctl enable podman.socket
systemctl start podman.socket
apt install software-properties-common uidmap -y
apt-get install -y libapparmor-dev
```
## Arch DMS
- [arc-releases](https://github.com/AuxXxilium/arc/releases)