Skip to content

Instantly share code, notes, and snippets.

@matinrco
Last active October 5, 2022 02:19
Show Gist options
  • Save matinrco/5515e213f6aaadae47dc4af003805385 to your computer and use it in GitHub Desktop.
Save matinrco/5515e213f6aaadae47dc4af003805385 to your computer and use it in GitHub Desktop.
Setting up Podman on WSL2 (Debian 10/buster) in Windows 10
  • Load OS related variables into shell:
    . /etc/os-release
    
  • Add repo:
    sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
    
  • Add apt key:
    curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_${VERSION_ID}/Release.key | sudo apt-key add -
    
  • Run:
    sudo apt update
    
  • Install Podman:
    sudo apt install podman
    
  • After running the above, you should have a base Podman installation. You can check this by running:
    podman info
    
  • To solve this error:

    unable to write pod event: "write unixgram @00013->/run/systemd/journal/socket: sendmsg: no such file or directory"
    
    Edit /etc/containers/containers.conf by:
    sudo nano /etc/containers/containers.conf
    
    and change events_logger
    from:
    events_logger = "journald"
    
    to:
    events_logger = "file"
    
  • To test :
    podman run --name nginx -p 8080:80 -d nginx:alpine
    
    now browse http://localhost:8080/ on your windows host.
@matinrco
Copy link
Author

matinrco commented Nov 6, 2020

source : from here

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