Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure podman #7

Open
dhirschfeld opened this issue Jun 30, 2022 · 6 comments
Open

Configure podman #7

dhirschfeld opened this issue Jun 30, 2022 · 6 comments

Comments

@dhirschfeld
Copy link
Member

Required for podman:

sudo apt install uidmap

xref: conda-forge/podman-feedstock#11

@dhirschfeld
Copy link
Member Author

dhirschfeld commented Jun 30, 2022

Configure podman

sudo mkdir /opt/mambaforge/envs/base/etc/cni  
chown -R $(id -u):$(id -g) /opt/mambaforge/envs/base/etc/cni/

Warning

Not relevant anymore.

@dhirschfeld dhirschfeld changed the title Add uidmap Configure podman Jun 30, 2022
@dhirschfeld
Copy link
Member Author

dhirschfeld commented Jun 30, 2022

mount --make-rshared / 

xref: conda-forge/podman-feedstock#25

Use wsl.exe "trick" to run this at the start. (Should use boot settings on Win11)

$ cat /etc/profile.d/02-shared-root.sh
wsl.exe -u root -e mount --make-rshared /

Avoids below error:

WARN[0000] "/" is not a shared mount, this could cause issues or missing mounts with rootless containers 

@dhirschfeld
Copy link
Member Author

dhirschfeld commented Jul 3, 2022

/tmp is a directory on WSL and without the systemd config the podman temp files don't get cleaned up resulting in unknown FS magic errors.

Ensure /tmp is cleaned up by mounting a tmpfs in /etc/fstab:

$ cat /etc/fstab
LABEL=cloudimg-rootfs   /        ext4   discard,errors=remount-ro         0 1
tmpfs                   /tmp     tmpfs  rw,nosuid,nodev,noatime,mode=1777 0 0

xref: containers/podman#12236

@dhirschfeld
Copy link
Member Author

dhirschfeld commented Jul 10, 2022

Potentially need:

# https://github.com/containers/podman/issues/2788#issuecomment-479923274
sudo chmod 4755 /usr/bin/newgidmap
sudo chmod 4755 /usr/bin/newuidmap

Warning

Not relevant anymore.

@dhirschfeld
Copy link
Member Author

Needs cgroupv2 enabled in .wslconfig:

❯ cat C:\Users\sysop\.wslconfig
[wsl2]
kernelCommandLine = cgroup_no_v1=all

@dhirschfeld
Copy link
Member Author

Missing pasta binary:

Error: could not find pasta, the network namespace can't be configured: exec: "pasta": executable file not found in $PATH

containers/podman.io#285

sudo apt install passt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant