Giter Site home page Giter Site logo

examosa / wsl2-podman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rosenbjerg/wsl2-podman

2.0 2.0 1.0 56 KB

Script for installing WSL2 + podman and podman-compose (or docker and docker-compose)

License: GNU General Public License v3.0

PowerShell 97.39% Batchfile 2.61%

wsl2-podman's Introduction

For podman on Windows, see the 1st party installation guide here

WSL2 podman/docker install script

Script for installing WSL2 + podman and podman-compose (or docker and docker-compose), and adding Windows "aliases" for convenience

Installation

  • Download and extract the .bat and .ps1 files into same folder and run the .bat script (will prompt for admin rights)
  • Switch from localhost to ::1 or wsl if you experience problems connecting to a container from some application on the host

Improvements and other suggestions

Please create issues for improvements or suggestions to the script

Known problems

Running the installer

If you experience problems starting the installer using the .bat script, it may be because the .ps1 file is blocked in Windows.

Right-click on the .ps1 file and select Properties. Then in the General tab, you will see the option to unblock it. After unblocking, you should be able to start the install script.

If that doesn't solve it, you may need to move the two files to another directory, possibly due OneDrive synchronization of the current folder. Moving the two files to the root of C:\ should resolve the issue.

Absolute paths

One problem with this docker-desktop alternative is that you cannot use absolute paths for mounting. Instead you will have to either use relative paths or rewrite C:\ to /mnt/c/ and use forward slashes

Connecting to containers using localhost

Some applications automatically resolve localhost to 127.0.0.1 (IPv4) which Windows doesn't forward to WSL2, without checking the Windows hosts file. This means you may experience problems connecting to the containers running in WSL2, if using localhost.

If you do experience this, try changing localhost/127.0.0.1 to ::1 (for TCP connections and [::1] for HTTP) or to wsl

Missing internet connectivity when using Cisco AnyConnect on Windows host

Connecting or disconnecting the AnyConnect client can cause internet connectivity problems in WSL2. Running the following powershell command with elevated rights fixes this:

Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match 'Cisco AnyConnect'} | Set-NetIPInterface -ErrorAction SilentlyContinue -InterfaceMetric 6000 | Out-Null

wsl2-podman's People

Contributors

rosenbjerg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

eizedev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.