fix(doc): tidy up and add suggestions from #25

A few notes were made for #25 that I could also apply for my own
authored docs.
This commit is contained in:
redbeardymcgee 2025-01-26 18:03:12 -06:00
parent 5cce25c9e8
commit 867d0d6437
3 changed files with 34 additions and 31 deletions

View file

@ -23,7 +23,7 @@ them and decide for yourself.
## Disks ## Disks
## Partitions ### Partitions
Repeat the following steps for all disks that you want to join together into Repeat the following steps for all disks that you want to join together into
one single logical volume. one single logical volume.
@ -37,7 +37,7 @@ dd if=/dev/zero of=/dev/sdX bs=512 count=1 conv=notrunc
dd if=/dev/zero of=/dev/sdY bs=512 count=1 conv=notrunc dd if=/dev/zero of=/dev/sdY bs=512 count=1 conv=notrunc
``` ```
## LVM ### LVM
```bash ```bash
# Create physical volume # Create physical volume
@ -54,7 +54,7 @@ mke2fs -t ext4 /dev/library/books
e2fsck -f /dev/library/books e2fsck -f /dev/library/books
``` ```
## /etc/systemd/system/volumes-books.mount ### /etc/systemd/system/volumes-books.mount
```ini ```ini
[Mount] [Mount]
@ -105,9 +105,10 @@ printf '%s\n' \
## Cockpit -> https://ip-addr:9090 ## Cockpit -> https://ip-addr:9090
> [!WARNING] > [!WARNING]
> Disable the firewall if you are lazy Exposing ports for other services can be > Disable the firewall if you are lazy like me. Exposing ports for other
> exhausting and I have not learned how to do this for containers properly. > services can be exhausting and I have not learned how to do this for
> Each container may need a new rule for something, not sure. > containers properly. Each container may need a new rule for something, not
> sure.
> ```bash > ```bash
> systemctl disable --now firewalld > systemctl disable --now firewalld
> ``` > ```
@ -145,7 +146,7 @@ dnf install setroubleshoot-server
Podman is a daemonless container hypervisor. This document prepares a fully Podman is a daemonless container hypervisor. This document prepares a fully
rootless environment for our containers to run in. rootless environment for our containers to run in.
## Install ### Install
```bash ```bash
dnf install podman dnf install podman
@ -156,9 +157,9 @@ systemctl enable --now podman
> Read the docs. > Read the docs.
> `man podman-systemd.unit` > `man podman-systemd.unit`
## Prepare host networking stack ### Prepare host networking stack
## slirp4netns ### slirp4netns
> [!NOTE] > [!NOTE]
> This may not be necessary but my system is currently using it. > This may not be necessary but my system is currently using it.
@ -167,7 +168,7 @@ systemctl enable --now podman
dnf install slirp4netns dnf install slirp4netns
``` ```
## Install DNS server for `podman` ### Install DNS server for `podman`
> [!NOTE] > [!NOTE]
> Not sure how to resolve these correctly yet but the journal logs it > Not sure how to resolve these correctly yet but the journal logs it
@ -177,7 +178,7 @@ dnf install slirp4netns
dnf install aardvark-dns dnf install aardvark-dns
``` ```
## Allow rootless binding port 80+ ### Allow rootless binding port 80+
> [!NOTE] > [!NOTE]
> This is only necessary if you are setting up the reverse proxy. > This is only necessary if you are setting up the reverse proxy.
@ -187,14 +188,14 @@ printf '%s\n' 'net.ipv4.ip_unprivileged_port_start=80' > /etc/sysctl.d/99-unpriv
sysctl 'net.ipv4.ip_unprivileged_port_start=80' sysctl 'net.ipv4.ip_unprivileged_port_start=80'
``` ```
## Allow containers to route within multiple networks ### Allow containers to route within multiple networks
```bash ```bash
printf '%s\n' 'net.ipv4.conf.all.rp_filter=2' > /etc/sysctl.d/99-reverse-path-loose.conf printf '%s\n' 'net.ipv4.conf.all.rp_filter=2' > /etc/sysctl.d/99-reverse-path-loose.conf
sysctl -w net.ipv4.conf.all.rp_filter=2 sysctl -w net.ipv4.conf.all.rp_filter=2
``` ```
## Prepare container user ### Prepare container user
This user will be the owner of all containers with no login shell or root This user will be the owner of all containers with no login shell or root
privileges. privileges.
@ -223,17 +224,17 @@ loginctl enable-linger $ctuser
> [!TIP] > [!TIP]
> Optionally setup ssh keys to directly login to $ctuser. > Optionally setup ssh keys to directly login to $ctuser.
### Setup $ctuser env
> [!NOTE] > [!NOTE]
> The login shell doesn't exist. Launch `bash -l` manually to get a shell or > The login shell doesn't exist. Launch `bash -l` manually to get a shell or
> else your `ssh` will exit with a status of 1. > else your `ssh` will exit with a status of 1.
## Setup $ctuser env
```bash ```bash
# Switch to user (`-i` doesn't work without a login shell) # Switch to user (`-i` doesn't work without a login shell)
sudo -u $ctuser bash -l machinectl shell $ctuser@ /bin/bash
# Create dirs # Create dirs
mkdir -p ~/.config/{containers/systemd,environment.d} ~/containers/storage mkdir -p ~/.config/{containers/systemd,environment.d}
# Prepare `systemd --user` env # Prepare `systemd --user` env
echo 'XDG_RUNTIME_DIR=/run/user/2000' >> ~/.config/environment.d/10-xdg.conf echo 'XDG_RUNTIME_DIR=/run/user/2000' >> ~/.config/environment.d/10-xdg.conf
# Enable container auto-update # Enable container auto-update

View file

@ -1,5 +1,18 @@
# podbox # podbox
## Table of Contents
- [What is this?](#what-is-this)
- [Table of Contents](#table-of-contents)
- [Getting started](#getting-started)
- [Dependencies](#dependencies)
- [Quickstart](#quickstart)
- [Hello, world](#hello-world)
- [Running real apps](#running-real-apps)
- [Example](#example)
- [Coming soon](#coming-soon)
- [Acknowledgments](#acknowledgments)
## What is this? ## What is this?
[Make `systemd` better for Podman with Quadlet](https://www.redhat.com/en/blog/quadlet-podman) [Make `systemd` better for Podman with Quadlet](https://www.redhat.com/en/blog/quadlet-podman)
@ -15,17 +28,6 @@ under the same user permissions as yourself, from within your own `$HOME`.
> containers, but it is not strictly required. Details for setting up a system > containers, but it is not strictly required. Details for setting up a system
> from scratch are located in [AlmaLinux.md](./AlmaLinux.md). > from scratch are located in [AlmaLinux.md](./AlmaLinux.md).
## Table of Contents
- [Getting started](#getting-started)
- [Dependencies](#dependencies)
- [Quickstart](#quickstart)
- [Hello, world](#hello-world)
- [Running real apps](#running-real-apps)
- [Example](#example)
- [Coming soon](#coming-soon)
- [Acknowledgments](#acknowledgments)
## Getting started ## Getting started
### Dependencies ### Dependencies

View file

@ -1,8 +1,8 @@
## Weechat ## Weechat
> [!WARNING] > [!WARNING]
> If you have permissions issue trying to persist data > [Potential permissions > If you have permissions issue trying to persist data > [Potential
> issue > permissions issue
> fix](https://github.com/weechat/weechat-container/issues/10#issuecomment-2472077317) > fix](https://github.com/weechat/weechat-container/issues/10#issuecomment-2472077317)
### Attach and configure ### Attach and configure
@ -11,7 +11,7 @@
> Detach key sequence: `ctrl-p` `ctrl-q`. > Detach key sequence: `ctrl-p` `ctrl-q`.
```bash ```bash
ssh -t $remotehost sh -lc 'cd; podman attach weechat' ssh -t $host machinectl shell $ctuser@ podman attach weechat
/set irc.look.smart_filter on /set irc.look.smart_filter on
/set irc.server_default.msg_part "" /set irc.server_default.msg_part ""
/set irc.server_default.msg_quit "" /set irc.server_default.msg_quit ""