====== Misc notes ======
Stuff I want to make a note of that doesn't fit anywhere else.
===== Rancher Desktop =====
==== Mounts not working ====
This can happen when you're mounting from somewhere outside of /Users/$UNAME or /tmp/rancher-desktop. It may manifest as mounts showing up as empty directories/folders when they should be files, or filled folders. MySQL containers will exit with the message ''ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.''
To fix, quit Rancher Desktop, then go to ''Library/Application Support/rancher-desktop/lima/_config'' and create a file, ''overrides.yaml'', with the following content:
mounts:
- location: /path/to/your/data
writable: true
Open up Rancher Desktop again and recreate your problem container(s).
===== Podman =====
==== iptables errors - chain already exists when starting container ====
This can happen on Alpine if using tailscale and upgrading to 1.76.6 or newer, as it now defaults to using nftables, conflicting with podman's default of using iptables. The fix is to ensure nftables is actually enabled by running ''rc-update add nftables default'' and then ''service nftables start'', followed by editing ''/etc/containers/containers.conf'' and changing ''#firewall_driver = ""'' to ''firewall_driver = "nftables"''. Then reboot.
===== Alpine =====
==== Traffic not passing when nftables active ====
This happens when you enable nftables after installing it. The reason is that the default rules in /etc/nftables.nft drop incoming traffic by default. Replace it with the following file:
#!/usr/sbin/nft -f
# vim: set ts=4 sw=4:
# You can find examples in /usr/share/nftables/.
# Clear all prior state
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy accept;
}
chain forward {
type filter hook forward priority 0; policy accept;
}
chain output {
type filter hook output priority 0; policy accept;
}
}
# The state of stateful objects saved on the nftables service stop.
include "/var/lib/nftables/*.nft"
# Rules
include "/etc/nftables.d/*.nft"
Then restart and enjoy.