Skip to content

Instantly share code, notes, and snippets.

@vec715
Last active May 21, 2024 16:43
Show Gist options
  • Save vec715/4c4858d7a6167fe5b69915869705fc87 to your computer and use it in GitHub Desktop.
Save vec715/4c4858d7a6167fe5b69915869705fc87 to your computer and use it in GitHub Desktop.
Setup Podman on Chrome OS Flex and Crostini

Actual versions for this guide:

  • Operating System: Debian GNU/Linux 12 (bookworm)
  • Kernel: Linux 6.1.64-09049-g010fe86d9eae
  • Architecture: x86-64
  • Podman: v1.7.1

Installation

1. Install Podman:

sudo apt install podman

2. Verify installation:

$ podman --version 
podman version 4.3.1

3. Install Podman Desktop:

sudo tar xvf podman-desktop-1.7.1.tar.gz --directory=/opt 

4. Create desktop shortcut for ChromeOS: [1]

  • Create the applications directory if it not exists yet:
mkdir ~/.local/share/applications 
  • Create Podman.desktop file using nvim (sudo apt install neovim):
nvim ~/.local/share/applications/Podman.desktop
  • Paste the following content (adjust icon path if needed):
[Desktop Entry]
Name=Podman Desktop
Exec=/opt/podman-desktop-1.7.1/podman-desktop %u
Terminal=false
Type=Application
Icon=/home/<put-your-username-here>/Images/podman.png 
  • Wait a few seconds or reboot Crostini/ChromeOS and icon should appear in the app launcher

5. Test Installation

  • Create a PostgreSQL container:
podman run -p 5432:5432 --name <your-container-name> -e POSTGRES_PASSWORD=postgres -d docker.io/postgres
  • Open Podman Desktop and you will see your container (restart the app if there are no info)

Troubleshooting

Error: cannot find UID/GID for user [2]:

  1. In Chrome, open crosh shell (Ctrl + Alt + T)
$ vsh termina
$ lxc exec penguin -- /bin/sh -c "printf '%s\n' '1000:100000:65536' | tee /etc/subuid /etc/subgid"

Error: potentially insufficient UIDs or GIDs [3]:

podman system migrate

References

  1. https://support.google.com/pixelbook/thread/708306/how-do-i-add-linux-apps-to-the-home-screen?hl=en
  2. https://ntk.me/2021/05/14/podman-in-crostini/
  3. containers/podman#12715
@barakplasma
Copy link

This was really helpful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment