tighten / takeout

Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
MIT License
1.6k stars 83 forks source link

Laravel Sail & Takeout without PHP & Composer #194

Closed plakhin closed 3 years ago

plakhin commented 3 years ago

I'm using Laravel Sail on WSL2. Since WSL 2 doesn't have PHP and Composer installed out of the box, I tried to use laravelsail/php74-composer container which comes with Sail but with no success. My steps are:

# create dir
mkdir ~/takeout && cd ~/takeout

# install takeout
docker run --rm -v $(pwd):/opt -w /opt laravelsail/php74-composer:latest composer require tightenco/takeout

# try to use it
docker run --rm -v $(pwd):/opt -w /opt laravelsail/php74-composer:latest php vendor/bin/takeout

the last command seems to work fine, however when trying docker run --rm -v $(pwd):/opt -w /opt laravelsail/php74-composer:latest php vendor/bin/takeout enable I'm getting this error:

 ERR  Docker is not installed.

 ERR  Please visit https://docs.docker.com/docker-for-mac/install/
 ERR  for information on how to install Docker for your machine.

How can I use takeout without installing php and composer locally into WSL2 distro?

mattstauffer commented 3 years ago

You can't run Takeout from within Docker because it's controlling/managing Docker.

You can't run Takeout on WLS2 without installing PHP and Composer locally.

We're currently working on a Node-based version of Takeout that will solve for exactly this problem but it's weeks or months away from being live.

I'm working also on a tool called Liftoff that gets PHP and Composer and Takeout installed on your machine, but I don't have the part where it installs PHP setup yet, just everything else. https://github.com/tighten/liftoff