Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Scampicfx's avatar

Move existing Laravel Sail project to a new Ubuntu VM

Dear Community,

is there a guide available which describes how to migrate an existing Laravel Sail Project (Windows, with WSL and Docker Installed) to a new location. I would like to transfer my existing project to a new Ubuntu VM and I noticed, that just copy- and pasting is not enough. I need to somehow setup the containers in docker so that I can launch the project from the new location at the Ubuntu VM.

Running the command ./vendor/bin/sail up after moving the complete project to the new location results in a "permission denied" error. Also, CHMODing all files in /vendor/bin to 777 does not solve this issue.

Any hint would be appreciated. Thank you!

Cheers, Chris

0 likes
9 replies
Sinnbeck's avatar

I don't assume that this Ubuntu VM is production?

What is the exact error?

Scampicfx's avatar

You're completely correct. It's not a production VM. I want to move my developing environment to a new machine.

The exact error is this one:

./vendor/bin/sail: 14: /home/USER/laravel/PROJECT/vendor/laravel/sail/bin/sail: Permission denied

I guess that the problem is somehow correlated because docker compose was not executed on the new machine and all the containers are missing there?

Thank you! Cheers, Chris

Scampicfx's avatar

@Sinnbeck It's still the same error. Do I need to do anything with docker-compose before launching sail?

My vendor/bin/sail folder looks like this:

- carbon
- carbon.bat
- commonmark
- commomark.bat
- php-parse
- phpunit
- phpuni.bat
- psysh
- sail
- sail.bat
- var-dump-server
- var-dump-server.bat
Sinnbeck's avatar

@Scampicfx maybe it cannot run your docker for some reason and that's what throws the error. Is there no more to the error?

I use Ubuntu myself, but use lando instead of sail

Scampicfx's avatar

When I start another project with the default commands, then this works flawlessly

curl -s https://laravel.build/helloworld | bash
Get started with: cd helloworld && ./vendor/bin/sail up

So I guess docker and so on is installed correctly. Where should I start to search or look for errors when migrating my existing laravel project to this new ubuntu vm?

Sinnbeck's avatar

@Scampicfx if it works with a new project in the same Ubuntu VM, I would compare the 2 projects. Something must be different between the two

MohamedTammam's avatar

Copy your project directory without the vendor folder, or just clone it from GitHub if it there, then run

composer install

Then

vendor/bin/sail up
Scampicfx's avatar

Thanks for your info. I just tried it. The following result is shown after composer install:

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run compose                                                                                                       r update.

  Problem 1
    - tijsverkoyen/css-to-inline-styles is locked to version 2.2.3 and an update                                                                                                        of this package was not requested.
    - tijsverkoyen/css-to-inline-styles 2.2.3 requires ext-dom * -> it is missin                                                                                                       g from your system. Install or enable PHP's dom extension.
  Problem 2
    - phar-io/manifest is locked to version 2.0.1 and an update of this package                                                                                                        was not requested.
    - phar-io/manifest 2.0.1 requires ext-dom * -> it is missing from your syste                                                                                                       m. Install or enable PHP's dom extension.
  Problem 3
    - phpspec/prophecy is locked to version 1.13.0 and an update of this package                                                                                                        was not requested.
    - phpspec/prophecy 1.13.0 requires php ^7.2 || ~8.0, <8.1 -> your php versio                                                                                                       n (8.1.2) does not satisfy that requirement.
  Problem 4
    - phpunit/php-code-coverage is locked to version 9.2.6 and an update of this                                                                                                        package was not requested.
    - phpunit/php-code-coverage 9.2.6 requires ext-dom * -> it is missing from y                                                                                                       our system. Install or enable PHP's dom extension.
  Problem 5
    - phpunit/phpunit is locked to version 9.5.6 and an update of this package w                                                                                                       as not requested.
    - phpunit/phpunit 9.5.6 requires ext-dom * -> it is missing from your system                                                                                                       . Install or enable PHP's dom extension.
  Problem 6
    - theseer/tokenizer is locked to version 1.2.0 and an update of this package                                                                                                        was not requested.
    - theseer/tokenizer 1.2.0 requires ext-dom * -> it is missing from your syst                                                                                                       em. Install or enable PHP's dom extension.
  Problem 7
    - tijsverkoyen/css-to-inline-styles 2.2.3 requires ext-dom * -> it is missin                                                                                                       g from your system. Install or enable PHP's dom extension.
    - laravel/framework v8.48.2 requires tijsverkoyen/css-to-inline-styles ^2.2.                                                                                                       2 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.3].
    - laravel/framework is locked to version v8.48.2 and an update of this packa                                                                                                       ge was not requested.

Due to the error above, I also executed composer update

This, was the result:

Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit[9.5.0, ..., 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
    - Root composer.json requires phpunit/phpunit ^9.5 -> satisfiable by phpunit/phpunit[9.5.0, ..., 9.5.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/8.1/cli/php.ini
    - /etc/php/8.1/cli/conf.d/10-opcache.ini
    - /etc/php/8.1/cli/conf.d/10-pdo.ini
    - /etc/php/8.1/cli/conf.d/20-calendar.ini
    - /etc/php/8.1/cli/conf.d/20-ctype.ini
    - /etc/php/8.1/cli/conf.d/20-exif.ini
    - /etc/php/8.1/cli/conf.d/20-ffi.ini
    - /etc/php/8.1/cli/conf.d/20-fileinfo.ini
    - /etc/php/8.1/cli/conf.d/20-ftp.ini
    - /etc/php/8.1/cli/conf.d/20-gettext.ini
    - /etc/php/8.1/cli/conf.d/20-iconv.ini
    - /etc/php/8.1/cli/conf.d/20-intl.ini
    - /etc/php/8.1/cli/conf.d/20-mbstring.ini
    - /etc/php/8.1/cli/conf.d/20-phar.ini
    - /etc/php/8.1/cli/conf.d/20-posix.ini
    - /etc/php/8.1/cli/conf.d/20-readline.ini
    - /etc/php/8.1/cli/conf.d/20-shmop.ini
    - /etc/php/8.1/cli/conf.d/20-sockets.ini
    - /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
    - /etc/php/8.1/cli/conf.d/20-sysvsem.ini
    - /etc/php/8.1/cli/conf.d/20-sysvshm.ini
    - /etc/php/8.1/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-dom` to temporarily ignore these required extensions.

What exactly do I need to do now? Thank you so much for your help!

Please or to participate in this conversation.