PHPackages                             thanatos-vf-2000/vagrant-docker-wls2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. thanatos-vf-2000/vagrant-docker-wls2

ActiveProject[DevOps &amp; Deployment](/categories/devops)

thanatos-vf-2000/vagrant-docker-wls2
====================================

Exemple of Vagrant and Docker in WSL2.

v1.0.0(3y ago)02GPL-2.0-or-laterDockerfile

Since Nov 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/thanatos-vf-2000/vagrant-docker-wls2)[ Packagist](https://packagist.org/packages/thanatos-vf-2000/vagrant-docker-wls2)[ Docs](https://github.com/thanatos-vf-2000/vagrant-docker-wls2)[ RSS](/packages/thanatos-vf-2000-vagrant-docker-wls2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

vagrant-docker-wls2
===================

[](#vagrant-docker-wls2)

[![GitHub version](https://camo.githubusercontent.com/2094507add743048e80b227e5b444f8ed8ef214d804d6995515f43096fa0bf0a/68747470733a2f2f62616467652e667572792e696f2f67682f7468616e61746f732d76662d3230303025324676616772616e742d646f636b65722d776c73322e737667)](https://badge.fury.io/gh/thanatos-vf-2000%2Fvagrant-docker-wls2)

[![Latest Stable Version](https://camo.githubusercontent.com/ce8168b3f4ed2a01cae643c54af6649f75a7af1f586a4f7f66089f4a860dba78/687474703a2f2f706f7365722e707567782e6f72672f7468616e61746f732d76662d323030302f76616772616e742d646f636b65722d776c73322f76)](https://packagist.org/packages/thanatos-vf-2000/vagrant-docker-wls2) [![Total Downloads](https://camo.githubusercontent.com/1f9e47b1fbac66e08897d8ad3728bdae5c41631a380276b2290cd063687f3ccd/687474703a2f2f706f7365722e707567782e6f72672f7468616e61746f732d76662d323030302f76616772616e742d646f636b65722d776c73322f646f776e6c6f616473)](https://packagist.org/packages/thanatos-vf-2000/vagrant-docker-wls2) [![Latest Unstable Version](https://camo.githubusercontent.com/6e8a1c2e422a58c197cf972a42b346ce4bd9e7463f63b50f0b5177aeb30f1e03/687474703a2f2f706f7365722e707567782e6f72672f7468616e61746f732d76662d323030302f76616772616e742d646f636b65722d776c73322f762f756e737461626c65)](https://packagist.org/packages/thanatos-vf-2000/vagrant-docker-wls2) [![License](https://camo.githubusercontent.com/03b80916c6f06056c3fd505d8ff158deca10eb5a4164cae39183dffab5c9635e/687474703a2f2f706f7365722e707567782e6f72672f7468616e61746f732d76662d323030302f76616772616e742d646f636b65722d776c73322f6c6963656e7365)](https://packagist.org/packages/thanatos-vf-2000/vagrant-docker-wls2) [![PHP Version Require](https://camo.githubusercontent.com/0a1da6e33ffe5635ca0a353ff4b4e28064c5387ffd4a9f9aec9950a88a154bc2/687474703a2f2f706f7365722e707567782e6f72672f7468616e61746f732d76662d323030302f76616772616e742d646f636b65722d776c73322f726571756972652f706870)](https://packagist.org/packages/thanatos-vf-2000/vagrant-docker-wls2)

Exemple of Vagrant and Docker in WSL2

Docker installation on WSL
--------------------------

[](#docker-installation-on-wsl)

Installing Docker in WSL

```
# Installation requirements
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

# Adding the Docker repo
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Adding the Docker repo key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Docker installation
sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io

# Add the current user to the Docker group
sudo usermod -aG docker $USER
```

Update IPTables

```
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
```

Create /etc/profile.d/vagrant.sh

```
sudo vi /etc/profile.d/vagrant.sh
```

Add this line to file

```
#https://developer.hashicorp.com/vagrant/docs/other/wsl
export PATH="$PATH:/mnt/c/Windows/System32/WindowsPowerShell/v1.0"
export PATH="$PATH:/mnt/c/Windows/System32"
export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
```

change right to file Add this line to file

```
sudo chmod a+x /etc/profile.d/vagrant.sh
```

- Under windows 11, you need to add these lines to /etc/wsl.conf

Edit file /etc/wsl.conf

```
sudo vi /etc/wsl.conf
```

Add this line

```
[boot]
command = "service docker start"
```

Run this command on cmd or powershell

```
wsl.exe --shutdown
```

Once the WSL machine is restarted, check that Docker is operational:

```
docker ps
```

- Under Windows 10, you must add these lines to your .profile

Edit file .profile

```
vi ~/.profile
```

Add this lines and replace WSL\_DISTRO\_NAME[1](#user-content-fn-1-42bef44f81c43577581df47153936f23) by the image name

```
if service docker status 2>&1 | grep -q "is not running"; then
    wsl.exe -d "${WSL_DISTRO_NAME}" -u root -e /usr/sbin/service docker start >/dev/null 2>&1
fi
```

Run this command on cmd or powershell

```
wsl.exe --shutdown
```

Once the WSL machine is restarted, check that Docker is operational:

```
docker ps
```

Installation of Vagrant
-----------------------

[](#installation-of-vagrant)

Add repository and install

```
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install vagrant
```

Restart WSL, run this command on cmd or powershell

```
wsl.exe --shutdown
```

Images
------

[](#images)

- [Ubuntu](https://hub.docker.com/_/ubuntu)
    - 14.04 - trusty
    - 16.04 - xenial
    - 18.04 - bionic
    - 20.04 - focal
    - 22.04 - jammy
    - 22.10 - kinetic
- Windows

Footnotes
---------

1. run in powershell commande wsl -l -v [↩](#user-content-fnref-1-42bef44f81c43577581df47153936f23)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1291d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e86c63f51e0df0913d28f2a72dad08060b94ef5d7879bba2131f72629285f175?d=identicon)[thanatos-vf-2000](/maintainers/thanatos-vf-2000)

---

Top Contributors

[![thanatos-vf-2000](https://avatars.githubusercontent.com/u/32266803?v=4)](https://github.com/thanatos-vf-2000 "thanatos-vf-2000 (5 commits)")

---

Tags

dockervagrantubuntuwsl2

### Embed Badge

![Health badge](/badges/thanatos-vf-2000-vagrant-docker-wls2/health.svg)

```
[![Health](https://phpackages.com/badges/thanatos-vf-2000-vagrant-docker-wls2/health.svg)](https://phpackages.com/packages/thanatos-vf-2000-vagrant-docker-wls2)
```

###  Alternatives

[spatie/docker

Run a docker container in your PHPUnit tests

478120.2k12](/packages/spatie-docker)[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

188672.6k2](/packages/ryoluo-sail-ssl)[aschmelyun/fleet

Run multiple Laravel Sail websites on your local environment

33269.5k](/packages/aschmelyun-fleet)[testcontainers/testcontainers

Testcontainers implementation in PHP

199184.7k17](/packages/testcontainers-testcontainers)[wdalmut/php-deb-packager

A simple debian packager for PHP applications

5483.7k8](/packages/wdalmut-php-deb-packager)[contributte/bootstrap

Extra contrib to nette/boostrap

111.5M3](/packages/contributte-bootstrap)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
